Disply the Default Text as watermarked in AJAX.

Posted by Chikul under JavaScript category on | Views : 1924
If TextBox is empty, it displays a message to the user. Once the user has typed some text into the TextBox, the watermarked appearance goes away.

<input type="text" size="25" value="Enter Your Text Here" onfocus="if(this.value == 'Enter Your Text Here'){this.value = '';}" onblur="if (this.value == ''){this.value = 'Enter Your Text Here';}" />
<input type="submit" value="Submit" />

Comments or Responses

Login to post response