Created
January 11, 2019 20:59
-
-
Save pablocattaneo/d6ba8065fe36879d717b255d2966b391 to your computer and use it in GitHub Desktop.
How to make input only accept numbers between 0 and 10 Avoiding +,-,. and e Source: https://stackoverflow.com/a/32784911/3599272
This file contains hidden or 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
<input onkeypress="return (event.charCode == 8 || event.charCode == 0 || event.charCode == 13) ? null : event.charCode >= 48 && event.charCode <= 57" min="0" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment