Skip to content

Instantly share code, notes, and snippets.

@aadshalshihry
Created January 26, 2020 09:06
Show Gist options
  • Save aadshalshihry/3ff94afe0588cabfc7a39a9b0d31ffec to your computer and use it in GitHub Desktop.
Save aadshalshihry/3ff94afe0588cabfc7a39a9b0d31ffec to your computer and use it in GitHub Desktop.
Input to be only English
$(".name_list").keypress(function(event){
var ew = event.which;
if(ew == 32)
return true;
if(48 <= ew && ew <= 57)
return true;
if(65 <= ew && ew <= 90)
return true;
if(97 <= ew && ew <= 122)
return true;
return false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment