簡體   English   中英

在 Internet Explorer 中打開的彈出窗口

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM