Hi Guys,
I'm working on a form and was wondering if this is the simplest/only way to clear input text on a form and have it come back if the field is left blank.
<p> Name: <input type="text" value="First Name" name="fname" onfocus="if(this.value == 'First Name'){this.value=''};" onblur="if(this.value==''){this.value='First Name'};"/>
<input type="text" value="Last Name" name="lname" onfocus="if(this.value == 'Last Name'){this.value=''};" onblur="if(this.value==''){this.value='Last Name'};"/></p><br />
<p> Phone number: <input type="text" name="phone" value="(555) 555-5555" onfocus="if(this.value == '(555) 555-5555'){this.value=''};" onblur="if(this.value==''){this.value='(555) 555-5555'};"
Many thanks,
LP