当用户单击图标时,我打开了一个popup.html。popup.html有一个按钮。如果这个按钮被点击,我想在关闭当前弹出窗口后显示另一个来自不同html文件的弹出窗口。有人知道怎么做吗?(我已经在我的按钮上附加了一个listner。我想知道的是如何关闭当前显示的弹出窗口并打开一个新的弹出窗口。
发布于 2012-06-04 00:24:03
弹出式窗口类似于常规选项卡,因此window.location.href="..."可以在它们上面工作。
但您可以简单地在弹出窗口中弹出一个覆盖和一个全屏iframe,并在其上覆盖一个关闭按钮。
<iframe src="http://target.com" style="position:absolute; left:0; top:0; right:0; bottom:0; width:...等等。
发布于 2014-09-20 18:18:57
您可以使用innerHTML动态更新弹出页面
var event_container;
event_container = document.getElementById('element ID');//Get location of event container
event_container.innerHTML = event_container.innerHTML + "html string you want to add";https://stackoverflow.com/questions/10869326
复制相似问题