Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- validateInputOnNumberKeyPress($('input[type="number"]'));
- function validateInputOnNumberKeyPress(input) {
- input.keypress(function (e) {
- if (e.which != 8 && e.which != 0 && e.which != 13 && (e.which < 48 || e.which > 57)) {
- return false;
- }
- });
- }
Add Comment
Please, Sign In to add comment