We have a simple html text input:
<input type=text /> – all I try to do is add event to fire when user will try to input certaing characters, for example space. So I can alert user while he is typing that these character are not allowed.
We have a simple html text input: <input type=text /> – all I try
Share
to extend rcravens answer a little, I would use the onkeyup event as I have had issues with IE not registering what key fired the event on the onkeydown. You can then process the keycode for the event to determine what actions you want to take.
Good resource: Quirksmode.org
and here: character codes