Input tag onblur/onfocus


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <input
  2. type="text"
  3. id="textfield"
  4. name="EMAIL"
  5. value="enter your email address"
  6. onblur="if (this.value == '') {this.value = 'enter your email address';}"
  7. onfocus="if (this.value == 'enter your email address') {this.value = '';}"
  8. >

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.