+ 3
How can I use the function keypress to validate the input on Javascript?
some examples please
2 ответов
+ 10
I recommend to use "oninput", it's much more useful for validations!
Here an example, try to use "onkeypress" (or "onkeydown", the first one does not work in my browser) and see the difference: https://code.sololearn.com/W4Ew7WdT86Hd/?ref=app
+ 4
thank you :) very useful