在使用带 validatebox 的输入框,第一次没输入出现如图验证提示信息
但是点击窗口取消后,再次打开窗口后输入框仍然带有验证信息,查看APi也没有找到解决的方法于是分析了一下页面代码,采用下面处理成功,
 
 
 $(".validatebox-tip").remove();
$(".validatebox-invalid").removeClass("validatebox-invalid");
 
 
另外,有一篇文章

easyui验证的删除和恢复 地址http://liuna718-163-com.iteye.com/blog/1726145 供参考

引用一下他的代码:

[javascript] view plaincopy在CODE上查看代码片派生到我的代码片
 
  1. $.extend($.fn.validatebox.methods, {    
  2.     remove: function(jq, newposition){    
  3.         return jq.each(function(){    
  4.             $(this).removeClass("validatebox-text validatebox-invalid").unbind('focus').unbind('blur');  
  5.         });    
  6.     },  
  7.     reduce: function(jq, newposition){    
  8.         return jq.each(function(){    
  9.            var opt = $(this).data().validatebox.options;  
  10.            $(this).addClass("validatebox-text").validatebox(opt);  
  11.         });    
  12.     }     
  13. });  
  14.   
  15. //使用  
  16. $('#id').validatebox('remove'); //删除  
  17. $('#id').validatebox('reduce'); //恢复  
posted on 2014-01-09 16:59  My life Of IT  阅读(258)  评论(0编辑  收藏  举报