这个问题只发生在边缘,但在IE11和Chrome中有效。有办法绕过这件事吗?
window.open )1st_child_window.opener.open)打开第二个子窗口。window.close或浏览器提供的-“X”-button),它会间歇性地工作。很多时候,它不能关闭,并保持为空白弹出窗口。然后,它只能被“任务管理器”杀死。step#2和step#3的代码列表
function showSecondChildScreen(url, FirstChildWindow) {
....
var mainWindow = FirstChildWindow.opener;
FirstChildWindow.close();
var SecondChildScreen = mainWindow.open(url,'passWin','width=700,top=120,left=200,titlebar=yes,resizable=yes,scrollbars=yes');
....
}编辑:用于复制的一个小示例的代码清单
<!DOCTYPE html>
<html>
<head>
<title>
Popup Window Test
</title>
<script type="text/javascript">
function showFirstChildWindow() {
var pidWin = window.open("firstChild.html",'firstChild','width=600,height=475,screenX=200,screenY=300,top=220,left=200,titlebar=yes,resizable=yes');
if (pidWin != null) {
pidWin.focus();
}
}
</script>
</head>
<body>
<p>
<b>Main Window </b>
</p>
<a href="javascript:void(0)" onclick="showFirstChildWindow();" > Nurse Patti </a>
</body>
</html>复制步骤(我还关闭了Edge中的“弹出阻止程序”以简化测试):
发布于 2017-09-06 21:05:39
最后,我们采用了一种不同的方法--将那些物理弹出窗口重写为jQuery弹出窗口。感谢所有在这里帮忙的人。
https://stackoverflow.com/questions/37706897
复制相似问题