Here is the javascript code to accept only numeric values in textboxes. This has to binded to
"onkeypress" event.
function onlyInteger(evt)
{
evt = window.event;
var charCode = evt.keyCode;
if (charCode > 31 && (charCode <> 57)) {
status = "This field accepts numbers only.";
return false;
}
status = "";
return true;
}
-::-
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment