clear input field javascript

JavaScript
Clear input field on focus
<!-- When the input field gets focus, replace its current value with an empty string -->
<input type="text" onfocus="this.value=''" value="The text"><input type="text" value="A new value" onfocus="if(this.value=='A new value') this.value='';">

Source

Also in JavaScript: