Only after something is typed inside the textbox, The button should be enabled.

Copy the following code in the notepad and save it as test.htm and then run it.

Ajax code for Check Availability of User ID

The Textbox should accept ONLY NUMBERS
Show The Code




The Textbox should accept ONLY UPPER CASE
Show The Code
What is the newline character for alert message?
< script language="Javascript" >
   alert("Hello\r\nMy Name is Preity");
< /script >
Note : In some browsers "\n" will work and some browers "\r\n" will work. For a safer side, always use "\r\n". Here r-stands for return, n-stands for new line. .