Numeric Validation Using Jquery
Numeric Validation Using Jquery
$(".numeric").keypress(function () {
debugger;
// Allow only backspace and delete
if (event.keyCode == 46 || event.keyCode == 8) {
// let it happen, don't do anything
}
else {
// Ensure that it is a number and stop the keypress
if (event.keyCode < 48 || event.keyCode > 57) {
event.preventDefault();
alert('Enter only numeric value.');
}
}
});
});
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home