Clear Field on Focus


/ Published in: JavaScript



Copy this code and paste it in your HTML
  1. <input type="text" onfocus="if(this.value == 'value') { this.value = ''; }" value="value" />

URL: http://css-tricks.com/snippets/javascript/clear-field-on-focus/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.