alphabet only

by Prasanth AR

HTML

<input id="a" type="text" />

JavaScript

$("#a").keypress(function(e) {
    if(e.which < 97 /* a */ || e.which > 122 /* z */) {
        e.preventDefault();
    }
});