摘要:
效果如下:CSS代码.watermark{ color:#999}JS代码(function($) { $.fn.watermark = function(c,t) { // c 水印样式 // t 水印提示信息 $(this).focus(function(){ var tf=$(this).hasClass(c); if(tf==true){ $(this).removeClass(c).val(""); //清空水印提示 } }); $(this).blur(function(){ ... 阅读全文