我也遇到这个问题,是这样解决的哈: 在jquery.validate.js中找 this.currentForm.elements 把return $([]).add(this.currentForm.elements)。return true;)}段代码,改成: return $(":input",this.currentForm).not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))return false;rulesCache[this.name]=true;return true}); 就没得问题了哈
首先你这个是Js的问题,其次的话这些插件也不是所有人都会去用的,没用过这个插件的话,人家自然不会回答你的问题,像表单验证很多人都自己写验证。所以没有人回答你的问题也是正常的.发一个到Js区去看看也许会有比较ok的答案.
在jquery.validate.js中找 this.currentForm.elements
把return $([]).add(this.currentForm.elements)。return true;)}段代码,改成:
return $(":input",this.currentForm).not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))return false;rulesCache[this.name]=true;return true});
就没得问题了哈