[英]Popup window open in Internet explorer
当用户单击某个链接时,我试图打开一个弹出窗口。 但是,我被卡住了,如果用户在 Edge 或 Chrome 中,我试图仅使用 Internet Explorer 打开此弹出窗口。 我已经尝试了下面的代码,但我似乎无法弄清楚它在哪里失败。 有没有办法以编程方式实现这一点? 任何帮助将不胜感激。
<a href="google.com" onclick="return popUpWin('popwin.html')"
>PopUp Window Clickme</a>
<script>
function popUpWin(link) {
newwindow=window.open(link,'name','height=300,width=170');
if (window.focus) {newwindow.focus()}
return false;
}
Function Openlink()
{
var shell = new ActiveXObject ("WSCRIPT.Shell")
shell.run("iexplorer.exe http://goole.com")
console.log("Testing")
}
shell.run("iexplorer.exe http://goole.com")
这不会打开 Internet Explorer
此外,请确保在 Chrome 和 Edge 上启用了弹出窗口。 Chrome 和 Edge 更安全。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.