/ Published in: jQuery
                    
                                        
                            
                                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
 Subscribe to comments
                    Subscribe to comments
                
                