Internet explorer 8 关闭IE8中的窗口
我有一个javascript,它调用一个弹出窗口(媒体播放器)来加载。这是可行的,但我希望父页面关闭,甚至看起来没有打开。这在Firefox中非常有效 代码是:Internet explorer 8 关闭IE8中的窗口,internet-explorer-8,window,Internet Explorer 8,Window,我有一个javascript,它调用一个弹出窗口(媒体播放器)来加载。这是可行的,但我希望父页面关闭,甚至看起来没有打开。这在Firefox中非常有效 代码是: </head> <body> <script language="javascript" type="text/javascript"> window.open("radio.html","Levante_Radio_Live","width=323,height=281,scrollbars=
</head>
<body>
<script language="javascript" type="text/javascript">
window.open("radio.html","Levante_Radio_Live","width=323,height=281,scrollbars=no,menubar=no,location=no",);
window.close();
</script>
</body>
window.open(“radio.html”、“Levante_radio_Live”、“width=323,height=281,scrollbars=no,menubar=no,location=no”,);
window.close();
您的JS很好,但我认为您遇到了IE的安全功能。它会提醒用户JS正在尝试关闭窗口,并需要另一个“是”对话框单击。我不确定有没有办法通过主窗口绕过这个问题。这适用于弹出窗口,因为浏览器知道您的页面已打开,因此在这种情况下不会提示您。IE8有一些问题。请尝试此javascript
window.opener.location.href=Redirect_url;
window.close();