<asp:TextBox ID="TextBox1" runat="server" class="searchfield" Text="Search Keywords"
onfocus="if(this.value=='Search Keywords')(this.value='');" onblur="if(this.value=='')(this.value='Search Keywords');" />
Essentially, the JavaScript reads like this: When the onclick event occurs, if the text in the text box is equal to: “Search Keywords”, set the text in the text box to nothing. When the onblur event occurs, if the text in the text box is nothing, set it to: “Search Keywords”.For additional information on JavaScript events, please visit: http://www.irt.org/articles/js058/.
No comments:
Post a Comment