create one php file as numberonly.php
write function into your javascript file
function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode <> 57))
return false;
return true; }
return false;
return true; }
put this function into textbox onkeypress event.
input type=text onkeypress=return isNumberKey(this.value)
input type=text onkeypress=return isNumberKey(this.value)
Enjoy.. you will get the result.
No comments:
Post a Comment