1

我只在 IE8 上收到一个错误,我的菜单没有加载到主页上。所有其他浏览器都很好。

IE 给了我这个“页面错误”:-

Message: Invalid argument.
Line: 2
Char: 66850
Code: 0
URI: https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js

奇怪的是,它在 Jquery 中,但实际上它是一些传递给 JQuery 的参数,它触发了错误。

经过调查,我发现以下行会引发错误:-

"this.parentNode.insertBefore(a,this.nextSibling"

这是关于错误的,现在我不知道它在代码中触发的位置。经过一些尝试,我在我的代码中发现了一个奇怪的场景,在我创建菜单的地方:-

`
"node-1" : ['Overview/2','Overview/3','Overview/4','Overview/5','Overview/6','Overview/7','Overview/8','Overview/9','Overview/10','Overview/11','Overview/12','Overview/13'],


"node-2" : 
['node/2/1','node/2/4','My-Perspective/Opportunity-for-RMEP','node/2/2','node/2/5','node/2/6','My-Perspective','My-Perspective/2','My-Perspective/3','My-Perspective/4','My-Perspective/5','My-Perspective/6','My-Perspective/7','My-Perspective/8','My-Perspective/9','My-Perspective/10','node/2/7',/*'node/2/44a','node/2/44b',*/'node/2/43','node/2/44','node/2/45','node/2/46','node/2/47','node/2/48','node/2/49','node/2/8','node/2/9','node/2/10','node/2/11','node/2/12','node/2/13','node/2/14','node/2/15','node/2/16','node/2/16a','node/2/16b','Value/Transportation','Value/Transportation/1','Value/Transportation/2','Value/Transportation/3','Value/Transportation/4','Value/Transportation/4b','Value/Outbound-logistics','Value/Outbound-logistics/2','Value/Outbound-logistics/3','Value/Outbound-logistics/4','Value/Outbound-logistics/5','Value/Outbound-logistics/6','Value/Outbound-logistics/7','Value/Inbound-logistics','Value/Inbound-logistics/2','Value/Inbound-logistics/3','Value/Inbound-logistics/4','node/2/50','node/2/51','node/2/52','node/2/53','node/2/54','node/2/55'],//,'node/2/56','node/2/57','node/2/58','node/2/59','node/2/60','node/2/61'],


"node-3" : 
['My-Experts/1', 'My-Experts/2', 'My-Experts/3', 'My-Experts/4', 'My-Experts/5', 'My-Experts/6', 'My-Experts/7', 'My-Experts/8', 'My-Experts/9'],//'vince-lima','dave-mcmurray','ron-gewin','bill-parr'],


"node-4" : 
['My-Way/Potential','My-Way/Potential/2','My-Way/Requirements','My-Way/Requirements/Business-Led-Approach','My-Way/Requirements/Integrative-Transformation','My-Way/Requirements/Systematic-Waves','My-Way/Junk','My-Way/Junk/Relevant-Examples','My-Way/Junk/High-Tech','My-Way/Junk/High-Tech/2','My-Way/Junk/High-Tech/3','My-Way/Junk/High-Tech/4','My-Way/Junk/High-Tech/5','My-Way/Junk/High-Tech/6','My-Way/Junk/Retailer','My-Way/Junk/Retailer/2','My-Way/Junk/Retailer/3','My-Way/Junk/Retailer/4','My-Way/Junk/Retailer/5','My-Way/Junk/Basic-Materials','My-Way/Junk/Basic-Materials/2','My-Way/Junk/Basic-Materials/3','My-Way/Junk/Basic-Materials/4','My-Way/Junk/Basic-Materials/5','My-Way/Junk/Basic-Materials/6','My-Way/Junk/Automotive', 'My-Way/Junk/Automotive/2','My-Way/Junk/Automotive/4','My-Way/Junk/Automotive/5','My-Way/Approach','My-Way/Approach/1','My-Way/Approach/2','My-Way/Approach/3','My-Way/Approach/4','My-Way/Approach/5' ],

"node-135" : 
['Why-me/My-Capabilities/We-have-the-most', 'Why-Me/My-Capabilities/We-have-the-most-2','Why-Me/My-Capabilities/Sample-Profiles','Why-Me/My-Capabilities/We-bring-proprietary-tools','Why-Me/My-Capabilities/My-Consultants-Combine','Why-Me/My-Capabilities/My-Consultants-Combine-2','Why-Me/My-Capabilities/My-DTV-Labs','Why-Me/My-Capabilities/My-Chicago-Lab','Why-Me/My-Capabilities/IT-Systems','Why-Me/My-partnership'],

"node-145" : ['Tools/1','Tools/2','Tools/3','Tools/4','Tools/5','Tools/6','Tools/7','Tools/8','Tools/9','Tools/10','Tools/11','Tools/12','Tools/13','Tools/14','Tools/15','Tools/16','Tools/17','Tools/18','Tools/19','Tools/20','Tools/21']
`

当我删除最后一个节点(node-145)时,页面没有给出任何错误,但仍然没有显示菜单。

4

1 回答 1

2

在IE8中,调出开发者工具,点击“脚本”选项卡,点击“开始调试”按钮,在浏览器中刷新页面。浏览器将执行代码,然后在导致问题的行上中断。虽然这不是对您问题的具体答案,但这将更加具体,并为您提供有关如何修复错误的更多信息,而不是控制台中的错误消息。

于 2014-03-03T19:24:57.677 回答