Reputation: 121
Here is the js code
function isCharKey(evt){
var charCode = event.keyCode
if ((charCode > 64 && charCode <91 )|| (charCode >96 && charCode<123) || (charCode==32))
return true;
return false;
}
Here is the html code
<label id="exe_form_name">Name:</label><input type="text" name="tbcust_name" id="name1" onkeypress="return isCharKey(event);">
Upvotes: 0
Views: 144
Reputation: 15
function isCharKey(evt) {
var charCode = evt.keyCode if ((charCode > 64 && charCode <91 )|| (charCode >96 && charCode<123) || (charCode==32)) return true; return false; }
Upvotes: 0