easyUI验证动态清除与恢复

$.extend($.fn.validatebox.methods, {  
    remove: function(jq, newposition){  
        return jq.each(function(){  
            $(this).removeClass("validatebox-text validatebox-invalid").unbind('focus').unbind('blur');
        });  
    },
    reduce: function(jq, newposition){  
        return jq.each(function(){  
           var opt = $(this).validatebox.options;
           $(this).addClass("validatebox-text").validatebox(opt);
        });  
    }   
});

//使用
$('#id').validatebox('remove'); //删除
$('#id').validatebox('reduce'); //恢复


你可能感兴趣的:(easyUI验证动态清除与恢复)