Java Script function to check numbers only..
function onlyNumbers(evt)
{
var e = event evt; // for trans-browser compatibility
var charCode = e.which e.keyCode;
if (charCode > 31 && (charCode <> 57))
return false;
return true;
}
Call this function on button onkeypress event
onkeypress="return onlyNumbers();"
No comments:
Post a Comment