Created
May 14, 2018 08:30
-
-
Save mojoblanco/ae982f1ef1ea58636924d624ad40b270 to your computer and use it in GitHub Desktop.
Allow numbers only js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ((evt.which < 48 || evt.which > 57) && (evt.which !== 8 || evt.which !== 48)) { | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment