For this we just have to add two events to the text box.
Take one text box & go to the source of the text box.
code of textbox will look something like this....
<asp:TextBox ID="TextBox1" runat="server">asp:TextBox>
We just have to add this two thing to text box & it will work as i said above....
onfocus="if(this.value =='SEARCH')this.value='';"
onblur="if(this.value=='')this.value='SEARCH';"
where "SEARCH" is default text of the textbox.
after adding this code of text box will look something like this....
<asp:TextBox ID="searchTextDown" runat="server"
onfocus="if(this.value =='SEARCH')this.value='';"
onblur="if(this.value=='')this.value='SEARCH';">SEARCH
</asp:TextBox>
0 comments:
Post a Comment