Is it possible to restrict the input of certain characters in HTML5/JavaScript? For example could I have a input textbox on the screen and if the user tries to type a letter it wouldn't show up in the box because I've restricted it to only numbers?
I know you can use pattern which will check on submit, but I want the "bad" characters to just never be entered at all.
The input textbox
JavaScript