Posts

Showing posts with the label mobile number validation

mobile number validation in javascript

mobile number validation is very important topic in javascript , we are try to say how to use mobile number validation in javascript , i think this is very useful for you thanks <script> function mobileNoValidation() { var mobile=parseInt(document.getElementById('mobile').value ); //var reg = /^([0-9]{10,10})$/; var reg = /^\d{10}$/; if(reg.test(mobile) == false) { alert('Please Enter Valid mobile number');  document.getElementById('mobile').focus(); return false; } } </script> <form action='#'> <input type="text" name="mobileNo" id="mobile" value="pease enter mobile no " maxlength="10" onClick="(this.value='')" onkeypress="return IsNumber(event , this);"  /> <input  type="submit" value="Submit"  onclick=" return  mobileNoValidation();" maxlength="12"  /> </fo...