/ Published in: JavaScript
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
$(document).ready(function(){
// Form : login
$("input[name=login]")
.blur( function() { if ($(this).val() == '' || $(this).val() == 'login') $(this).css('color', '#999').val('login'); } )
.focus( function() { if ($(this).val() == 'login') $(this).css('color', '#fff').val(''); } )
.trigger('blur')
;
// Form : password
$("input[name=pass]")
.blur( function() { if ($(this).val() == '' || $(this).val() == 'password') $(this).css('color', '#999').val('password'); } )
.focus( function() { if ($(this).val() == 'password') $(this).css('color', '#fff').val(''); } )
.trigger('blur')
;
} );
Comments
 Subscribe to comments
                    Subscribe to comments
                
                