简体   繁体   English

(仅在IE中)SCRIPT65535:对方法或属性访问的意外调用。 main.js,第152行字符28

[英](Only in IE) SCRIPT65535: Unexpected call to method or property access. main.js, line 152 character 28

After going through several stackoverflow posts regarding this error and none of them actually apply to my case, I am getting this error on a line in my js file in developer tools while debugging:- 在经历了几篇有关此错误的stackoverflow帖子之后,它们均未真正适用于我的情况,在调试时,我在开发人员工具的js文件的一行上收到此错误:

var el = $("#" + tagName);
 el.val(el.html(value).text()); //this is the one where debugger points to

This is the relevant code in js file:- 这是js文件中的相关代码:-

 $.ajax({
        type: "get",
        url: "cgi-bin/system_status.cgi?tokn="+sessnID+",active="+tickle_activity+",id="+page_id+",sub="+sub_id+",tab="+tab_id,
        dataType: "xml",
        success: function (xml) {
            errorCnt = 0;
            $(xml).find('response').children().each(function () {
                if (this.nodeName === "user_info") {
                    parseUserInfo(this);
                }
                else {
                    $(this).children().each(function () {
                        var tagName = this.tagName;
                        var value = $(this).text();
                        /* If this is a time block then do some translation */
                        if (tagName === "time") {
                            if (showTimeValues != undefined) { showTimeValues(this); }
                        }
                        else if (tagName === "satellite") {
                            if (parseSatDataXml != undefined) { parseSatDataXml(xml); }
                        }
                        else if (tagName === "ntpstatus") {
                            if (parseNtpDataXml != undefined) { parseNtpDataXml(xml); }
                        }
                        else if (tagName === "alarms") {
                            if (parseAlmDataXml != undefined) { parseAlmDataXml(xml); }
                        }
                        else if (tagName === "alarmSettings") {
                            if (parseAlmSettingDataXml != undefined) { parseAlmSettingDataXml(xml); }
                        }
                        else if (tagName === "status") {
                            setStatusTextColor(value);
                            setStatusButton(value);
                            $("#" + tagName).val(value);
                        }
                        else {
                           var el = $("#" + tagName);
                           el.val(el.html(value).text());//error thrown

                        }
                    });
                }
            });

Only in IE im having this issue, in all other browsers it works fine and i dont observe anything else other than that error in the debugging tools. 仅在IE中出现此问题,在所有其他浏览器中它都能正常工作,除调试工具中的该错误外,我没有观察到其他任何东西。 I am using IE9 and latest jquery version 1.12.1 我正在使用IE9和最新的jquery版本1.12.1

Actually, even though I was using IE9 in my developer tools there was an option which said Browser Mode: and it was set to IE7 standards. 实际上,即使我在开发人员工具中使用IE9,也有一个选项表示浏览器模式:并且它被设置为IE7标准。 That is why I was getting this error. 这就是为什么我得到此错误。 The moment i switched to IE9 standards (not the compatibility mdoe option). 当我切换到IE9标准(不是兼容性mdoe选项)的那一刻。 It all works as expected. 一切都按预期工作。 If you are new to web development like me you might encounter this issue(not being aware that there are browser modes) as well. 如果您像我这样的网站开发新手,也可能会遇到此问题(不知道有浏览器模式)。 So in summary, In debugger tools (F12) -> Click on browser mode and choose IE9 . 因此,总而言之, In debugger tools (F12) -> Click on browser mode and choose IE9

Dont choose the compatibility option. 不要选择兼容性选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IE错误“意外调用方法或属性。 行:113字符:460代码:0” - IE Error “Unexpected call to method or property access. Line: 113 Char: 460 Code: 0” 错误:SCRIPT65535:无效的调用对象行1字符1 - Error: SCRIPT65535: Invalid calling object line 1 character 1 意外调用方法或属性。 在JQUERY - Unexpected call to method or property access. in JQUERY jQuery v1.8.3在ie 8中创建错误,即7“对方法或属性访问的意外调用”。 - jQuery v1.8.3 creating error in ie 8 and ie 7 “Unexpected call to method or property access.” 意外调用方法或属性。 微软客户关系管理 - Unexpected call to method or property access. MS CRM 意外调用方法或属性。 的jquery.js?版本1.7.1 = - Unexpected call to method or property access. jquery.js?ver=1.7.1 IE 11 Ajax错误-“ SCRIPT65535:参数不可选” - IE 11 ajax error - “SCRIPT65535: Argument not optional” 在IE 7中意外调用方法或属性访问 - Unexpected call to method or property access in IE 7 IE7 / 8中意外调用方法或属性 - Unexpected call to method or property access in IE7/8 未捕获的TypeError:Chrome或SCRIPT65535中的非法调用:提交表单时IE中的调用对象无效 - Uncaught TypeError: Illegal invocation in Chrome or SCRIPT65535: Invalid calling object in IE when submit form
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM