【发布时间】:2015-06-17 14:24:26
【问题描述】:
我正在开发一个firefox插件,
在我的设置页面 dialog.xul 我有一个 iframe,我在其中加载不同的设置页面 page1.xul page2.xul page3.xul
Iframe:
<vbox flex="1">
<iframe
id="iframe"
src="chrome://xxx/content/page1.xul"
flex="1"></iframe>
</vbox>
在 iframe 内我需要从 page2.xul 导航到 page3.xul
使用 page2.xul 中的代码
我的代码(page2.xul):
gBrowser.loadURI("chrome://xxx/content/page3.xul");
也试过了
document.getElementById("iframe").setAttribute("src", "chrome://xxx/content/page3.xul");
但它不起作用我知道 iframe 容器无法从 iframe 访问,但我该如何进行重定向?
【问题讨论】:
标签: javascript firefox iframe firefox-addon xul