最近在IE 11 兼容模式下使用 ComponentOne 的时候,出了个 js error.具体的提示信息是:
Unable to get property 'item' of undefined or null reference.
具体的js错误提示的位置在:
function C1QInitPage ()
{
if (!window.external.ManualRender || window.external.DesignMode)
{
// Used to loop through document.all.item("C1QItem"), but when OnLoad is called for the first time,
// after control creation, document.all.item("C1QItem") is empty (must be an IE bug).
// Looping through all items checking their id works.
for (i = 0; i < document.all.length; i++)
{
if (document.all.item(i).id == "C1QItem")
{
if (window.external.DesignMode || document.all.item(i).C1QItemID == window.external.CurrentItemID)
document.all.item(i).all.item("C1QMainMenuButton").style.visibility = "visible";
else
document.all.item(i).all.item("C1QMainMenuButton").style.visibility = "hidden";
}
}
}
C1QAdjustScrollbars();
}
出处就在这行 document.all.item(i).all.item("C1QMainMenuButton").style.visibility = "hidden";
我尝试着在我们应用中 覆盖这个js,但是不起作用。
希望得到您们的回复!
非常感谢! |
|