This is particularly useful when there is a limited space available for a form. You can set the actual name of the field or a example value, so the user can better understand what he/she has to fill in. The following example apply to textboxes:
onfocus="if (this.value=='First Name*') this.value='';"
onblur="if (this.value=='') this.value='First Name*';"
Using this script will cause the default value upon clicking inside the field to disappear. If nothing is filled the original value will be reverted. If this field is set to be required, it will display a validation error.





