js验证文本框及提示: 

$(".isData").blur(function (){ 
       var reg = /xxxxx/;
      var value=$(this).val(); 
      if(! reg.test(value)){
                 $(this).val("错误"); 
                 $(this).css("color","red"); 
                 $(this).click(function (){
                 $(this).val(""); 
                  $(this).css("color","black"); 
                }); 
       } 
});


posted on 2013-06-13 08:59  wyang0126  阅读(195)  评论(0编辑  收藏  举报