Last active
November 10, 2016 13:29
-
-
Save fedorovsky/4721d69d372d30c8a508b63901275f08 to your computer and use it in GitHub Desktop.
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
$('#txtbox').bind("change keyup input click", function() { | |
if (this.value.match(/[^0-9]/g)) { | |
this.value = this.value.replace(/[^0-9]/g, ''); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment