135
rated 0 times
[
138]
[
3]
/ answers: 1 / hits: 69128
/ 12 Years ago, wed, november 28, 2012, 12:00:00
Is it possible to restrict the input of certain characters in HTML5/JavaScript? For example, could I have an input textbox on the screen and if the user tries to type a letter in it, it wouldn't show up in the box because I've restricted it to only numbers?
I know you can use a pattern
which will be checked on submit, but I want the "bad" characters to just never be entered at all.
More From » html