2012-12-11 11 views
0

看来,在Firefox中,这行代码不起作用:jQuery的IFRAME父在Firefox不工作

iframeWin.refreshImgList(); 

然而,上述相同的代码适用于其他浏览器(IE,甚至GASP ... !)。

iframeWin是iframe的ID。我在iframe之外试图调用那个功能refreshImgList这就是iframe中的内容。

我需要为上面的代码添加/编辑什么内容才能使其在所有其他浏览器中以相同的方式在FF中工作?

+1

你在哪里使用这段代码?里面的iframe src的JavaScript? – user10

+0

@ user10:从iframe中调用它。 pageslide在主页上(iframe之外) – StealthRT

+0

请参阅http://stackoverflow.com/questions/5477324/iframe-calling-parent-javascript – user10

回答

0

啊!发现解决方案:

$("#iframeWin")[0].contentWindow.refreshImgList(); 
相关问题