/ Published in: jQuery
![](/img/icon_sav.png?v3)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('input').each(function() { var default_value = this.value; $(this).focus(function() { if(this.value == default_value) { this.value = '';} }); $(this).blur(function() { if(this.value == '') { this.value = default_value;} }); });
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)