javascript - 当参数功能齐全时,Window.open 创建新选项卡而不是弹出窗口

标签 javascript

我看到很多问题询问如何使用 window.open 打开选项卡,但我想要相反的。单击链接时,我想要一个功能齐全的新窗口(不要缺少地址栏或任何其他内容),而不是新选项卡。

我一直在使用这个:

window.open('http://example.com', 'blah', 'titlebar=1,toolbar=1,scrollbars=1,location=1,status=1,menubar=1,resizable=1,width=800,height=600,top=10,left=10');

在 FF 中,我得到新窗口作为弹出窗口。在 Chrome(和 IE9)中,它会作为新选项卡打开。

如果我设置 status=0,我会收到弹出窗口,但它不是 chrome 中的普通窗口(但在 IE9 中)。有什么想法吗?

最佳答案

没有办法告诉 JS 或 HTML 操作在新选项卡还是新窗口中打开链接。它完全依赖于浏览器。

被欺骗了 target="_blank" opens a new window in IE9, instead of a new tab

IE设置:http://www.techrepublic.com/article/set-internet-explorer-to-open-links-in-a-new-window-automatically/5222050

super 用户的 Chrome 设置:https://superuser.com/questions/166479

mozilla 支持上的 Firefox 设置:http://support.mozilla.org/en-US/kb/tab-preferences-and-settings

关于javascript - 当参数功能齐全时,Window.open 创建新选项卡而不是弹出窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15126794/

相关文章:

javascript - 使用 Javascript Mongodb 驱动程序进行聚合

javascript - 如何在屏幕最后显示最近上传的图片?

javascript - fadeIn 仅在未显示时 fadeOut 完成

javascript - 我应该如何最好地跟踪页面请求之间的计时器?

java - 如何在网页上突出显示文本 - 严格定时 - 没有 Flash 的卡拉 OK。选择什么技术?

javascript - 如何在 javascript 中实现对 webSocket 连接的 Ping/Pong 请求?

javascript - 谷歌 Material 图表 : Stop Tooltip Rounding

javascript - 谷歌云平台存储 JSON API 上传会破坏音频文件..?!怎么修?

javascript - 对象属性插入表 jQuery

javascript - 查找距初始 GPS 点集 10 英尺的点