a) Performs validation for alphabets entered in the textbox. b) If the entered value is not an alphabet, it gives an alert. b) Simple and easy to use.
Features
Performs validation for alphabets entered in the textbox.
If the entered value is not an alphabet, it gives an alert.
Simple and easy to use.
Preview
Accept Only Alphabets - Textbox
Downloads
Javascript Code
<!-- Script by hscripts.com --> <!-- More scripts @www.hscripts.com --> <script type="text/javascript"> function AllowAlphabet(){ if (!frm.alphabet.value.match(/^[a-zA-Z]+$/) && frm.alphabet.value !="") { frm.alphabet.value=""; frm.alphabet.focus(); alert("Please Enter only alphabets in text"); } } </script><!-- Script by hscripts.com -->