The desired behaviour is when the user clicks or tabs into the text box it clears the value only if it is set to the default value, i.e. if they have since changed it from the default value, and click back into the box we don't want to change the value they have changed it to.
This is very simple, as shown in the example below.
<input type="text" value="enter your keywords here" onfocus="if(this.value == this.defaultValue) this.value = ''" />
The default value is "enter your keywords here", and when the text box gets focus (the onfocus="" part) it will clear the value if it is still the default.