WaterMark Effect in TextBox with the help of JavaScript


Please try this

Step 1:-  Take a TextBox (Text1)

<input type="text" id="Text1" style="background-color:blue" value="Enter your text here" onfocus="show()" />

Step 2:-  In the Head Part:-

<script type="text/javascript">
function show()
{
    document.getElementById("Text1").value=" ";
    document.getElementById("Text1").style.backgroundColor="White";
}
</script>
Next Recommended Reading How to Set Watermark in ASP.NET TextBox