www.gusucode.com > 200套html5精品模板151_200 > 200套html5精品模板151_200/200/js/input.fields.js

    jQuery.fn.inputHints=function(){jQuery(this).each(function(i){jQuery(this).val(jQuery(this).attr('title'));});jQuery(this).focus(function(){if(jQuery(this).val()==jQuery(this).attr('title'))
jQuery(this).val('');}).blur(function(){if(jQuery(this).val()=='')
jQuery(this).val(jQuery(this).attr('title'));});};


jQuery(document).ready(function() {
    jQuery('input[title], textarea[title]').inputHints();
});