/ Published in: jQuery
![](/img/icon_sav.png?v3)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var textoPadrao = 'busca' $('#txtBusca').val(textoPadrao).css('color','#999') .focus(function(){ if($(this).val() == textoPadrao){ $(this).css('color','').val(''); } }).blur(function(){ if($(this).val() == ''){ $(this).val(textoPadrao).css('color','#999') } });
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)