+ 3

Block E from being typed

https://code.sololearn.com/We1rSdjApTeH/#html Ok, so right now, I have this set to simply say "Invalid input" if an E is present. But is there a way I can block E from being typed? Maybe remove E from the array so it wont be evaluated? UPDATE: Corrected the title Was: Block E from being typing? Corrected to: Block E from being typed? I can engrish I swear

30th Sep 2018, 3:16 AM
Daniel Cooper
Daniel Cooper - avatar
1 Answer
+ 3
Add: onkeydown="javascript: return event.keyCode == 69 ? false : true" to your <input> tag in the HTML
30th Sep 2018, 2:55 PM
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱
Ronen Gil רונן גיל رونين جيل 🏳️‍🌈♾🇹🇩🇮🇱 - avatar