Jquery Text:Allow text box only for letters using jQuery? I want to make a text box allow only letters (a-z) using jQuery, Allow text box only for letters using jQuery, textbox to allow only alphabets using JQuery by mukkaram waheed February 13, 2019 HTML <input id="txtFirstName" value=""> JavaScript $(function () { $('#txtFirstName').keydown(function (e) { if (e.shiftKey || e.ctrlKey || e.altKey) { e.preventDefault(); } else { var key = e.keyCode; if ( !((key == 8) || (key == 32) || (key == 46) || (key >= 35 && key <= 40) || (key >= 65 && key <= 90)) ) { e.preventDefault(); } } }); });