This code snippet is usefull if you want to have a form field pre-filled with a text that explains what the field is for, and when the user sets focus on the field the text disappears.
Put the following code in the input tag and change the [TEXT] value to your liking.
onfocus="if(this.value=='[TEXT]')this.value='';" onblur="if(this.value=='')this.value='[TEXT]';"
Comments
Post new comment