JavaScript Scripts

Español Français 中文 Deutsch Portuguese Japanese nederlands
Free Java Script Codes
Javascript List All
Slide Show Slide Show
Ad Display Ad Display
Image Effect Image Effect
Animated Image Effects Animated Image Effects
Form Validation Form Validation
Color Picker Tool Color Picker Tool
Formatting Forms Formatting Forms
Select All Select All
Dynamic Form Select Dynamic Form select
Dynamic Color Dynamic Color
Dynamic Color Calendar
Textbox Counter Textbox Counter
Alphanumeric Alphanumeric
Date Time Script Date & Time
Stop Watch Script Stop Watch script
Delete Repeated Values Delete Repeated Values
Pagination Pagination
Random Generator Random Generator
Animated Text Animated Text
Cursor Position Cursor Position
User Info Window / User Info
Security Security / Authenticate
Bookmark Bookmark
Mouse Effects Mouse Effects
Title Bar Title Bar
Status Bar Status Bar
Country List Country List
Free Games Free Games
Calculators Calculators

Accept Only Alphabets in a Textbox

 Simple javascript textbox that accepts only alphabets to be entered.

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.


Accept Only Alphabets - Textbox

Enter Text:

Javascript Code
<!-- Script by -->
<!-- Copyright of HIOXINDIA -->
<!-- More scripts -->

<script type="text/javascript">
function AllowAlphabet(){
               if (!frm.alphabet.value.match(/^[a-zA-Z]+$/) && frm.alphabet.value !="")
                    alert("Please Enter only alphabets in text");

<!-- Script by -->

<table align=center>
<tr><td><form name="frm">
Enter Text: <input type="text" name="alphabet" onkeyup="AllowAlphabet()">
<div align=center style="font-size: 10px; color: #dadada;" id="dumdiv">
<a href="" id="dum" style="text-decoration:none; color: #dadada;">©h</a>
<script type="text/javascript">document.onload = ctck();</script>

Release Date - 06-05-2010
Get free version without ©copyright link for just 5 price

For customization of this script or any script development, contact us at

 a) Copy and paste the javascript code into your HTML page and make use of this.
 b) Here, the function "AllowAlphabet()" is used to accept only alphabets in the textbox.

- The javascript (misspelled as java script) is given under GPL License
- i.e. Free use for those who use the codes as it is.
- Free, if your modification does not remove our copyright information and links.
- Click Here for detailed license information.
- You can purchase the script if your requirements does not meet our GPL License terms.
Other Links

web hosting