【发布时间】:2017-11-07 05:42:19
【问题描述】:
我可以在新浏览器(不是弹出窗口)窗口中点击打开链接吗?
我尝试过的事情:
<a href='http://osric.net/' onclick='return !window.open(this.href);'>osric.net web hosting</a>
一个函数onclick:
var windowObjectReference;
var strWindowFeatures = "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes, toolbar=yes";
function openRequestedPopup() {
windowObjectReference = window.open("http://www.cnn.com/", "CNN_WindowName", strWindowFeatures);
}
但有了这些,它只能在新标签中打开。
【问题讨论】:
-
你如何区分“新浏览器窗口”和“弹出窗口”?
标签: javascript internet-explorer-11