Delete a field from an Html form when clicking (focus)
It is certainly happened to fall on an HTML form with values pre-filled for example describing the type of expected value.
Though it may be useful under certain circumstances, if you have to delete all the data to enter other ones it could be tiresome
It is possible to remove it as soon as the user selects the field:
<form ... >
<input type="text" name="name" size=16 value="Enter your name" onFocus="javascript:this.value=''" />
<input type="submit" value="Validate" />
</form>
But using this method all the text will be erased whatsoever!
You can use a condition to replace only if the value is "Enter your name:
<input onclick="if(this.value=='Enter your name)this.value=''; ... />