第一次发帖。
我遇到了 IE8 的间歇性问题,我得到一个:
“对象不支持此属性或方法”
使用以下命令将 iFrame 检索到变量中时会发生这种情况:
var wfw = window.frames[i];
让我感到困惑的是,在我调用的这行代码之前:
var length = window.frames.length;
它返回值 4。我想我的问题是为什么我不能检索存在的东西?
var length = window.frames.length;
for(var i = 0; i < length; i++){
// Grab the window.frames collection so that we can iterate through it.
var wfw = window.frames[i];
try {
// Attempt to push the BISCheckEvent code onto the child Window and execute it. This is to account for Iframes that have already loaded
wfw.eval("var BISCheckEvent = new " + BISCheckEventImpl.toString() + "; BISCheckEvent.attachHandler(); ");
} catch(e){
// Iframe has no source, so just capture the exception and move on.
}
}