1
我只在IE8上接收到錯誤信息,而我的菜單沒有載入主頁。所有其他瀏覽器都很好。只有在IE8中出現JavaScript錯誤「Invalid Argument」
的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']
`
當我刪除的最後一個節點(節點145),該頁面不給任何錯誤,但仍不顯示菜單。
...和其他瀏覽器不報告錯誤控制檯中的任何內容?你引用的那條引發錯誤的行缺少一個右括號 - 但我認爲這是一個錯字? – MrWhite