Search Text Box empty by Javascript. And text when out click

Search Text Box empty by Javascript. And text when out click
<script type="syntaxhighlighter" class="brush: html">

<input type="text" onfocus="if(this.value =='Enter to Search' ) this.value=''" onblur="if(this.value=='') this.value='Enter to Search'" value="Enter to Search" style="width: 100%;" class="go" name="keywords">

</script>