Categories




PreviousNext
Allow only alphabets for textbox      1 Up
 Send mail Views:2105
Belongs to : Javascript
Facebook Bookmarkbookmark this pageStumbleupon Bookmark 

Allow only alphabets
Use the below code to allow only alphabets in your textbox.
<html>
<head>
<script type = "text/javascript">
function AllowAlphabet(){
if (!TEST.TESTER.value.match(/^[a-zA-Z]+$/) && TEST.TESTER.value !="")
{
TEST.TESTER.value="";
TEST.TESTER.focus();
alert("Please Enter only alphabets in text");
}
}

</script>
</head>
<body>
<form name="TEST">
<input type="text" name="TESTER" onkeyup="AllowAlphabet()">
</form>
</body>
</html>

funny pictures and videos
funny pictures and videos
online games
embed code


By - Nirmala, On - 2010-04-08
Send This
PreviousNext

User Comments


Add NEW Feedback:

Name :     Email :

Website Monitoring Web hosting by Hiox India Contact Us   Privacy Policy   Terms and Conditions