我已经看到很多问题,询问如何用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中)。有什么想法吗?
答案 0 :(得分:1)
无法告诉JS或HTML操作在新选项卡和新窗口中打开链接。它完全取决于浏览器。
欺骗SO target="_blank" opens a new window in IE9, instead of a new tab
超级用户的Chrome设置:https://superuser.com/questions/166479
mozilla支持的Firefox设置:http://support.mozilla.org/en-US/kb/tab-preferences-and-settings