Dr.Ajay Kashyap

Dr.Ajay Kashyap

  • NA
  • 521
  • 284.1k

How To Allow Only alphabet ,space and Å Ä Ö & å ä ö

Jun 9 2017 4:29 AM
i want allow user to type only alphabet ,space and Å Ä Ö & å ä ö the given character in Text Box.
alphabet validation and space is working fine but what i have to do for this character Å Ä Ö & å ä ö
 
 Followning is code :- 
 
<script language="javscript" type="text/javascript">
function ValidateAlpha(evt) {
debugger;
evt = (evt) ? evt : event;
var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
if (charCode != 13 && charCode > 31 && (charCode < 37 || charCode > 40) && (charCode < 65 || charCode > 90) && (charCode < 97 || charCode > 122) && (charCode == 196 || charCode == 142))
{
swal("Enter Only Character");
return false;
}
return true;
}
</script>
 

Answers (1)