在边缘IE模式中,当一个新窗口被迫出现在Mode上时,它将被添加到一个新的选项卡中,而不是弹出。
如何显示从边缘IE模式到边缘的新窗口??
--添加--如果我不得不强制Edge在IE模式下运行,我希望弹出一个新窗口,而不是一个新选项卡。
https://i.stack.imgur.com/mOW95.png
<html>
<head>
<script type="text/javascript">
function test()
{
location.href = 'microsoft-edge:https://www.google.com';
}
function popup(){
let options = "toolbar=no,scrollbars=no,resizable=yes,status=no,menubar=no";
window.open("microsoft-edge:"+"https://www.google.com", options);
}
</script>
</head>
<body>
<br>
<a href="microsoft-edge:https://www.google.com" rel="noopener noreferrer">href direct</a><br>
<br>
<a href="#" onclick="test();">location</a><br>
<br>
<a href="#" onclick="popup();">window open</a><br>
<br>
<a href="microsoft-edge:http://www.google.com" onclick="window.open(this.href,'_blank');return false;">onclick</a>
</body>
</html>发布于 2022-07-05 08:25:01
首先,如果没有在IE模式列表中配置站点,默认情况下它将以Microsoft而不是Edge IE模式打开站点。
其次,如果您需要打开一个新窗口,可以将高度和宽度添加到windowFeatures参数中的window.open()中,如下所示:
function popup() {
let options = "toolbar=no,scrollbars=no,resizable=yes,status=no,menubar=no,height=450,width=720";
window.open("https://www.google.com","Popup", options);
}https://stackoverflow.com/questions/72862861
复制相似问题