The following will give the default ‘value’ attribute of an input field one style, then when a user focuses in the field it will clear – displaying user inputted text with a new style.


<input type="text" name="trans1_1" size="6" value="Enter your email" style="color:#999;" onfocus="if(this.value==this.defaultValue){this.value='';}this.style.color='#000';" onblur="if(this.value==''){this.value=this.defaultValue;this.style.color='#999';}">