Watermark Textbox using javascript
<p>I need some help in my code.</p>

<p>I want the code dynamic like using a class in javascript, but I have not been too strong using javascript. I need your solution.</p>

<p>E.g the textbox display a text 'Enter key word or phrase', if someone enter the textbox. text 'Enter key word or phrase' disappear. and if not enter or mouse over the textbox the text 'Enter key word or phrase' appear again in color gray.
I have the code below:</p>

<pre><code>&lt;asp:TextBox ID="txtQuery" runat="server" style="color: Gray;" 
ValidationGroup="req" value='Enter key word or phrase' 
onblur="if (this.value == '') { this.value = 'Enter key word or phrase'; 
this.style.color = 'Gray'; }" 
maxlength="255" onfocus="if(this.value == this.defaultValue){this.value='';  
this.style.color='Black'}"&gt;&lt;/asp:TextBox&gt;
</code></pre>

<p>Please help.</p>
