错误:TypeError:window.attachEvent不是函数

sub*_*odh 5 javascript jquery

我正在使用custome.js,PIE.js并jquery1_7_2.js提交我的jsp

这是我的custome.js,仅此而已.

jQuery(document).ready(function(){
   jQuery(function() {

    if (window.PIE) {
        jQuery('#login-box, .sign-button, .new-user-btn, .grey-btn, .code-btn, #contact-email, #contact-email .continue, #contact-email .cancel').each(function() {
            PIE.attach(this);
        });
    }

});

})
Run Code Online (Sandbox Code Playgroud)

在所有浏览器中一切正常.但在Firefox中,它向我显示了这个错误

Error: TypeError: PIE.attach is not a function
Source File: http://localhost:8080/MyApp/js/custom.js
Line: 6
Run Code Online (Sandbox Code Playgroud)

请指导我解决这个问题.

编辑: 它显示我在这行PIE.js中的错误

window.attachEvent( "onunload的",一个); fKsa =功能(B,C,d){b.attachEvent(C,d); this.ba(函数(){b.detachEvent(C,d)})} })(); f.Qa = new f.ea; fKsa(window,"onresize",function(){f.Qa.wa()});(function(){function a(){f.mb. wa()} f.mb = new f.ea; fKsa(window,"onscroll",a); f.Qa.ba(a)})();(function(){function a(){c = f .kb.md()} function b(){if(c){for(var d = 0,e = c.length; d

和custome.js在这一行

PIE.attach(本);

Kon*_*nev 12

附加事件以使其跨浏览器执行以下操作:

if (target.addEventListener) {
    target.addEventListener(eventName, handlerName, false);
} else if (target.attachEvent) {
    target.attachEvent("on" + eventName, handlerName);
} else {
    target["on" + eventName] = handlerName;
}
Run Code Online (Sandbox Code Playgroud)