Posted By

laxman2021 on 12/11/12


Tagged

numbers validation chars special


Versions (?)

Javascript validation for text box . Special Characters, Numbers.


 / Published in: PHP
 

Special chars, Numbers validation.

  1. <script language=Javascript>
  2.  
  3. function isSpaceKey(evt)
  4. {
  5. var charCode = (evt.which) ? evt.which : event.keyCode
  6.  
  7. if ((charCode < 65 || charCode > 90) && (charCode < 97 || charCode > 123) && charCode != 32 && charCode != 8)
  8. {
  9. alert("Enter Characters Values");
  10. return false;
  11. }
  12.  
  13.  
  14. return true;
  15. }
  16. </script>
  17.  
  18. onkeypress="return isSpaceKey(event);"

Report this snippet  

You need to login to post a comment.