Javascript 原型扩展jquery在internet explorer中不起作用;“不支持”;

Javascript 原型扩展jquery在internet explorer中不起作用;“不支持”;,javascript,jquery,internet-explorer,prototype,Javascript,Jquery,Internet Explorer,Prototype,我用一些原型扩展了jQuery以验证表单 if($('#mydiv').valid()) { /*do submit stuff*/} 它在Firefox中运行完美,但IE11给了我: “对象不支持该属性或方法” 意大利语中的“我不支持我的合法性” 谢谢,新年快乐! IE debug报告错误,但问题是由于函数具有类似php的参数初始化: function aaa(a="some thing"){ //stuff } 我改为: function aaa(a){ if(!a) a="some t

我用一些原型扩展了jQuery以验证表单

if($('#mydiv').valid()) { /*do submit stuff*/}
它在Firefox中运行完美,但IE11给了我: “对象不支持该属性或方法” 意大利语中的“我不支持我的合法性”

谢谢,新年快乐! IE debug报告错误,但问题是由于函数具有类似php的参数初始化:

function aaa(a="some thing"){
//stuff
}
我改为:

function aaa(a){
if(!a) a="some thing";
//stuff
}

谢谢

什么对象不支持什么属性?您可以在代码中记录一些内容,然后按F12打开IE的开发工具。例如
console.log($().valid)
console.log(typeof$().valid)
您到底是如何将这个
valid
方法添加到jQuery的?您需要显示如何扩展它的代码。