Clear default textfield value on click


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

No need to create a seperate function for this one. Just one line to clear the default value on click and leave the value when it has been altered.


Copy this code and paste it in your HTML
  1. <input name="email_address" value="Email address" onfocus="if($(this).val() == 'Email address') { $(this).val('')}" type="text">

URL: http://www.dyteq.com/2ndquest/?p=171

Report this snippet


Comments


You need to login to view comments.