I have the following dynamic input html
in my project
$(this).html("");
Now i was trying to add validation for using only numeric in above input text field.
But being new to jquery i was wondering how do i add keypress event to it
Want to use following validation to it
function isNumber(evt) {
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
return false;
}
return true;
}
I tried follwoing but does not seem to work
$(this).html("");
EDIT
Any other way to add validation for using only number
No comments:
Post a Comment