The Tech Pursuit
The Dev Shelf
Pages
Home
Interview Questions
About Me
April 27, 2011
Accept Number Only in JavaScript
var mob= document.getElementById("CustMob").value;
var matchArr1 = mob.match( /^[0-9]+$/);
if (matchArr1 == null)
{
alert('Fill Customer Mobile No and It Should be numeric only ');
document.form1.CustMob.focus();
return(false);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment