Input onfocus onblur





14
Date Submitted Fri. Jul. 28th, 2006 1:10 AM
Revision 1 of 1
Beginner delook
Tags Form | HTML | JavaScript
Comments 2 comments
Set a word or phrase in an input field, clear it onfocus

<input type="text" name="email" value="E-Mail" onfocus="if(this.value=='E-Mail'){this.value=''};" onblur="if(this.value==''){this.value='E-Mail'};" />
 

Luk Jakober

eisbergstudios.com

Comments

Comments A better way method!
Sat. Jul. 29th, 2006 5:18 PM    Helper rastersize
  Comments Even better
Thu. Oct. 19th, 2006 9:03 PM    Helper Thomas

Voting