Created
May 20, 2020 10:38
-
-
Save attilaking/72c29ed81dcdcf4cdd542dfa869079f0 to your computer and use it in GitHub Desktop.
Number input only #number #validate
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
function isNumberKey(evt) | |
{ | |
var charCode = (evt.which) ? evt.which : event.keyCode | |
if (charCode > 31 && (charCode < 48 || charCode > 57)) | |
return false; | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment