JavaScript
count vowel in JavaScript
<html> <body> <h1> Count vowel</h1> <script> let str = " hello, world!"; let vowelCount = 0; // convert string to lowercase to handle both uppercase and lowercase vowels str = …
count vowel in JavaScript Read MoreEvents in JavaScript
<html> <body> <script> function clickevent() { alert("HELLO WORLD"); } </script> <input type="button" onclick="clickevent()" value="CLICK HERE"> </body> </html> <html> <head> </head> <body> <script > function mouseover() { alert("Wake Up"); …
Events in JavaScript Read MoreDisplay 1 to 10 in JavaScript
<html> <body> <script> for (var i = 1; i <= 10; i++) { document.write(i + "<br>"); } </script> </body> </html>
Display 1 to 10 in JavaScript Read Morefinding power in JavaScript
<html> <head> <script> function calculate() { var base = document.getElementById("base").value; var exponent = document.getElementById("exponent").value; var result = Math.pow(base, exponent); document.getElementById("output").innerHTML = "The result is " + result; } </script> </head> …
finding power in JavaScript Read MoreJQuery form validation in JavaScript
<html> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"> </script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.0/jquery.validate.min.js"> </script> <script> $(document).ready (function () { $("#basic-form").validate (); }); </script> <body> <h4> jQuery Validation Form Example </h4> <form id = "basic-form" action="" method="post"> <p> …
JQuery form validation in JavaScript Read MoreJQuery simple example in JavaScript
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function(){ $("#hide").click(function(){ $("p").hide(); }); $("#show").click(function(){ $("p").show(); }); }); </script> </head> <body> <p> HELLO WORLD THIS </p> <button id="hide">Hide</button> <button id="show">Show</button> </body> </html>
JQuery simple example in JavaScript Read Moreform validation using JavaScript
<html> <head> <title>Form Validation</title> <script> function validate() { var b=document.frm1.txtEmail.value; var len=b.length; var a='@'; var dot='.'; var valid1,valid2; //form validation for First Name if(document.frm1.txtFirstName.value=="") { alert("The First Name is Empty"); …
form validation using JavaScript Read More