Short ONELINER:
<input onkeydown="return /[a-z]/i.test(event.key)" >
For all unicode letters try this regexp: /\p{L}/u
(but … this) – and here is working example 🙂
More Related Contents:
- Java script on focus instead of onclick
- jQuery selector for inputs with square brackets in the name attribute
- How do you get the cursor position in a textarea?
- Image convert to Base64
- Mobile Safari: Javascript focus() method on inputfield only works with click?
- How to get the containing form of an input?
- How do I use jQuery’s form.serialize but exclude empty fields
- Phone mask with jQuery and Masked Input Plugin
- JS Events: hooking on value change event on text inputs
- Can’t get value of input type=”file”?
- Format input value in Angularjs
- html() vs innerHTML jquery/javascript & XSS attacks
- How to display file name for custom styled input file using jquery?
- Javascript Input Text Masking without Plugin
- Detect when “cursor position inside input change” in jQuery?
- Disable spaces in Input, AND allow back arrow?
- jQuery multiply vars inside value [duplicate]
- How to disable browser reload button on mouse click
- How to check if element is visible after scrolling?
- Why use jQuery on() instead of click()
- Can jQuery provide the tag name?
- Load image with jQuery and append it to the DOM
- Where is jQuery.data() stored?
- How to dynamically modify in materialize css framework
- How to read line by line of a text area HTML tag
- Capture event onclose browser
- Looping through jQuery Deferreds after all promises have been called
- Hour difference between two times(HH:MM:SS a)in momentjs
- JQuery .hasClass for multiple values in an if statement
- Unloading/Removing content from an iFrame