HTML(Open Method)翻译自MSDN
Open Method
Opens a new window and loads the document specified by a given URL.
Navigates the app window to the specified location.
Syntax
语法:var retval = window.open(url, name, features, replace);
Parameters
参数
url [in, optional]
Type: String
类型:字符串类
String that specifies the URL of the document to display. If no URL is specified, a new window with about:blank is displayed.
这个字符串是识别所展示文件的URL,如果没有可识别的URL,就会打开一个about:blank的新页面.
name [in, optional]
Type: String
类型:字符串类
String that specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
这个字符串类是识别窗口的名字.这个名称是用作窗体或锚元素的目标属性的值。
_blank
The url is loaded into a new, unnamed window.
从一个未命名的新窗口打开URL
_parent
The url is loaded into the current frame's parent. If the frame has no parent, this value acts as the value _self.
从现在框架的上级打开,要是没有上级,这个属相就相当于_self
_self
The current document is replaced with the specified url.
当前文档被所指定的URL替代
_top
The loaded url replaces any framesets that might be loaded. If there are no framesets defined, this value acts as the value _self.
加载的URL可能替换框架集任意一个.如果没有定义的框架集,这个属性相当于 _self
features [in, optional]
Type: String
类型:字符串
String that contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes
,toolbar=yes
"). The following values are supported.
字符串,包含由逗号分隔的项列表。每一个项包涵一个选项和一个值,用等号分开(比如:"fullscreen=yes
,toolbar=yes
").后面的值支持同样功能.
channelmode = { yes | no | 1 | 0 }
Specifies whether to display the window in theater mode. The default is no.
指定是否在剧场模式中显示窗口。默认值是没有
Internet Explorer 7. channelmode = { yes | 1 }
overrides height, width, top, and left values. When active, the Navigation Bar is hidden and the Title Bar is visible. The Channel Band is no longer supported in Internet Explorer 7.
Internet explorer 7。channelmode = {yes | 1} 将覆盖高度、 宽度、 上边框和左的值。激活时,隐藏导航栏和标题栏是可见。在 Internet Explorer 7 不再支持通信信道的带宽。
In Internet Explorer 6, channelmode = { yes | 1 }
displays the Channel Band in theater mode.
在 Internet Explore 6中,channelmode = {yes | 1} 在剧场模式中显示通信信道的带宽。
fullscreen = { yes | no | 1 | 0 }
Specifies whether to display the browser in full-screen mode. The default is no. Use full-screen mode carefully. Because this mode hides the browser's title bar and menus, always provide a button or other visual clue to help the user close the window. ALT+F4 closes the new window.
指定是否全屏显示浏览器.默认不全屏.用fullscreen是要小心.因为全屏将隐藏浏览器的标题栏和菜单栏,通常提供一个按钮或者其他可见线索来关闭窗口.ALT+F4关闭新窗口.
Internet Explorer 7. A window in full-screen mode doesn't need to be in theater mode.
Internet explorer 7。在全屏幕模式下的窗口并不需要在影院模式下。
In Internet Explorer 6, a window in full-screen mode must also be in theater mode (channelmode).
在Internet Explorer 6 中,在全屏模式下的窗口也必须在剧场模式 (channelmode)。
width = number
Sets the width of the window in pixels. The minimum value is 250
, and specifies the minimum width of the browsers content area.
设置窗口的宽度,以像素为单位。最小值为 250,并指定浏览器内容区域的最小宽度。
In Internet Explorer 6, the minimum height value is 100
.
在Internet Explorer 6,最小高度值是 100。
height = number
Sets the height of the window in pixels. The minimum value is 150
, and specifies the minimum height of the browser content area.
以像素为单位设置窗口的高度。最小值为 150,并指定浏览器内容区域的最小高度。
In Internet Explorer 6, the minimum height value is 100
.
在Internet Explorer 6,最小高度值是 100。
left = number
Specifies the left position, in pixels. This value is relative to the upper-left corner of the screen. The value must be greater than or equal to 0.
指定的左边的位置,以像素为单位。此值是相对于屏幕的左上角。值必须是大于或等于0。
top = number
Specifies the top position, in pixels. This value is relative to the upper-left corner of the screen. The value must be greater than or equal to 0.
指定的最高的位置,以像素为单位。此值是相对于屏幕的左上角。值必须是大于或等于0。
location = { yes | no | 1 | 0 }
Specifies whether to display the Navigation Bar. The default is yes.
指定是否显示导航栏。默认值为是。
In Internet Explorer 6, location specifies whether to display the Address Bar.
在Internet Explorer 6,位置指定是否显示地址栏。
The Back, Forward, and Stop commands are now located in the Navigation Bar.
后面,向前,和停止命令在导航栏中显示。
In Internet Explorer 6, the navigation commands were located in the toolbar.
在Internet Explorer 6,导航命令位于工具栏。
menubar = { yes | no | 1 | 0 }
Specifies whether to display the Menu Bar. The default is yes.
指定是否显示菜单栏。默认值为是。
Internet Explorer 7. By default, the menu bar is hidden unless revealed by the ALT key. menubar = { no | 0 }
prohibits the Menu Bar from appearing even when the ALT key is pressed.
Internet explorer 7。默认情况下,菜单栏被隐藏,除非显示的 ALT 键。菜单栏 ={no | 0} 禁止菜单栏甚至出现按下 ALT 键时。
The combination of menubar = { no | 0 }
and toolbar = { no | 0 }
hides the toolbar and disables any additional third-party user interfaces.
菜单栏的组合 = {no | 0} 和工具栏 = {no | 0} 隐藏工具栏并禁用任何其他第三方用户接口。
resizable = { yes | no | 1 | 0 }
Specifies whether to display resize handles at the corners of the window. The default is yes.
指定是否显示在窗口角的大小调整控柄。默认值为是。
Internet Explorer 7. resizable = { no | 0 }
disables tabs in a new window.
Internet explorer 7。可调整大小 = {no | 0} 禁用在新窗口中的选项卡。
scrollbars = { yes | no | 1 | 0 }
Specifies whether to display horizontal and vertical scroll bars. The default is yes.
指定是否显示水平和垂直滚动条。默认值为是。
status = { yes | no | 1 | 0 }
Specifies whether to add a Status Bar at the bottom of the window. The default is yes.
指定是否要在窗口的底部添加一个状态栏。默认值为是。
toolbar = { yes | no | 1 | 0 }
Specifies whether to display the browser Command Bar, making buttons such as Favorites Center, Add to Favorites, and Tools available. The default is yes.
指定是否要显示浏览器命令栏,制作等收藏中心,添加到收藏夹按钮,以及可用工具。默认值为是。
The combination of menubar = { no | 0 }
and toolbar = { no | 0 }
turns off the toolbar and any additional third-party user interfaces.
菜单栏工具栏的组合menubar = {no | 0} 和toolbar = {no | 0} 关闭工具栏和任何其他第三方用户接口。
In Internet Explorer 6, the toolbar sFeatures specifies whether to display the browser toolbar, making buttons such as Back, Forward, and Stop available.
在Internet Explorer 6 中,工具栏 sFeatures 指定是否显示浏览器工具栏上,制作按钮如后退、 前进、 并停止可用。