Created
August 25, 2016 00:50
-
-
Save yevhenii-horbenko/16842af3fa447dc486eceb8574efc471 to your computer and use it in GitHub Desktop.
Check only numbers
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
document.getElementById('number-check1').onkeypress = function (e) { | |
return !(/[А-Яа-яA-Za-z ]/.test(String.fromCharCode(e.charCode))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment