[英]window.open opening tabs and windows in Google Chrome
I have this JS function who activates when a button is clicked: 我有这个JS函数,当点击一个按钮时激活它:
function redirect() {
win = window.open(\"$ref\", target=\"_blank\");
win2 = window.open(\"$ref\", target=\"_blank\");
win3 = window.open(\"$ref\", target=\"_self\");
}
First call to window.open opens a new tab in Chrome, second window.open opens a new window and the third window.open successfully "redirects" the original window to $ref. 首先调用window.open在Chrome中打开一个新选项卡,第二个window.open打开一个新窗口,第三个window.open成功地将原始窗口“重定向”到$ ref。
My question is: why the first and the second window.open open both a tab and a window? 我的问题是:为什么第一个和第二个window.open打开一个标签和一个窗口? Is there any way to open only tabs?
有没有办法只打开标签?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.