javascript window.open

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3465653/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 01:15:18  来源:igfitidea点击:

javascript window.open

javascript

提问by user160820

Possible Duplicate:
JavaScript open in a new window, not tab

可能的重复:
JavaScript 在新窗口中打开,而不是选项卡

How can I open a new window (not a tab!) when I call a window.open function. That window should not contain an toolbar, or menu options.

当我调用 window.open 函数时,如何打开一个新窗口(不是选项卡!)。该窗口不应包含工具栏或菜单选项。

Thanks

谢谢

回答by Dominic Rodger

window.open("http://www.google.com",
            "name_your_window",
            "location=1,status=1,scrollbars=1,resizable=no,width=200,height=200,menubar=no,toolbar=no");

For a list of the parameters available, see here.

有关可用参数的列表,请参见此处

回答by Jhong

You can't override the browser settings to "open all new windows in a tab" in all browsers (thank goodness). This is a duplicate of: JavaScript open in a new window, not tab

您无法在所有浏览器中覆盖浏览器设置以“在选项卡中打开所有新窗口”(谢天谢地)。这是以下内容的副本:JavaScript 在新窗口中打开,而不是选项卡