window.open----method

open method

Opens a new window and loads the document specified by a given URL. 打开一个新窗口并加载给定URL指定的文档。

Navigates the app window to the specified location. 导航应用程序窗口到指定的位置。

Syntax  语法 var retval = window.open(url, name, features, replace); 设置变量retval打开窗口。

URL:新窗口地址; name:窗口打开方式,新窗口或自身窗口打开;

features:特性--新窗口的特点;replace:取代(此属性一般不用)。 -----设置的变量打开窗口,open后一半就前三个属性。

Parameters参数

url [in, optional]新窗口地址;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,一个新窗口:显示空白。

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.

url加载到当前帧的父母。如果帧没有父母,这个值作为_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.     字符串包含一个由逗号分隔的物品列表。每个条目包含一个选项和值,由一个等号(例如,“全屏=是的,工具栏= 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 = {是的| 1 }覆盖的高度,宽度,顶部和左值。当活跃,隐藏导航栏和标题栏是可见的。通道乐队在Internet Explorer 7不再支持。

In Internet Explorer 6, channelmode = { yes | 1 } displays the Channel Band in theater mode.

在Internet Explorer 6中,channelmode = {是的| 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.

指定是否显示浏览器全屏模式。默认是否定的。谨慎地使用全屏模式。因为这种模式隐藏浏览器的标题栏和菜单,总是提供一个按钮或其他视觉线索来帮助用户关闭窗口。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)。

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。

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键。菜单条= {没有| 0 }禁止菜单栏出现即使按下ALT键。

The combination of menubar = { no | 0 } and toolbar = { no | 0 } hides the toolbar and disables any additional third-party user interfaces.

菜单条的组合= {没有| 0 }和工具栏= {没有| 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。可调整大小的= {没有| 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.

菜单条的组合= {没有| 0 }和工具栏= {没有| 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指定是否显示浏览器工具栏,让等按钮,前进,停止。

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。

    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。

时间: 2024-08-09 23:53:47

window.open----method的相关文章

解决IE中window.open打开链接refer丢失的问题

来源: http://www.coderanch.com/t/114767/HTML-CSS-JavaScript/nClick-window-open-loses-referrer Hello,I have a table with cells, and the complete area of each cell should be a clickable link (not only the text in it). Therefore I couldn't use normal hype

window.close()提示 "script may close only the windows that were opened by it"

由于在脚本中使用了 window.close(), 当前非弹出窗口在最新版本的chrome和firefox里总是不能关闭,而在 IE中是可以关闭的 .在console中弹出提示"script may close only the windows that were opened by it" (脚本只能关闭它所打开的窗口), 不明白是什么原因. 研究了好几天.终于明白了问题所在. 首先,什么是非弹出窗口呢? 非弹出窗口,即是指(opener=null及非window.open()打开的

深入理解getComputedStyle

jQuery的css()的底层实现就用到了getComputedStyle这个方法,也许我们用到的很少,但是不得不说这时一个非常强大的函数,下面让我们一探究竟! 第一部分:基本语法 在mdn上,我们可以看到它是这样定义的: The Window.getComputedStyle() method gives the values of all the CSS properties of an element after applying the active stylesheets and re

requestAnimationFrame,Web中写动画的另一种选择

HTML5/CSS3时代,我们要在web里做动画选择其实已经很多了: 你可以用CSS3的animattion+keyframes; 你也可以用css3的transition; 你还可以用通过在canvas上作图来实现动画,也可以借助jQuery动画相关的API方便地实现; 当然最原始的你还可以使用window.setTimout()或者window.setInterval()通过不断更新元素的状态位置等来实现动画,前提是画面的更新频率要达到每秒60次才能让肉眼看到流畅的动画效果. 现在又多了一种

python核心编程--笔记

python核心编程--笔记 的解释器options: 1.1 –d   提供调试输出 1.2 –O   生成优化的字节码(生成.pyo文件) 1.3 –S   不导入site模块以在启动时查找python路径 1.4 –v   冗余输出(导入语句详细追踪) 1.5 –m mod 将一个模块以脚本形式运行 1.6 –Q opt 除法选项(参阅文档) 1.7 –c cmd 运行以命令行字符串心事提交的python脚本 1.8 file   以给定的文件运行python脚本 2 _在解释器中表示最后

函数节流

1. 函数节流: 由于dom操作极其昂贵,所以尝试过多的dom操作有可能会将浏览器搞崩溃,比如onresize.onscroll这类事件操作: 为了解决这个问题,引出函数节流的概念(某些代码不可以在没有间断的情况下连续重复执行): 方案:第一次调用函数创建一个定时器,在指定时间之后执行代码:在第二次调用时,清除掉前一次的定时器并重新设置一个: 这种方案下,如果第一个定时器已经执行,这个操作就没意义:如果第一个没执行,则将其替换为新的定时器:目的是只有在执行函数的请求停止一段时间后才执行: 适用于

js setTime()详解

来源:http://www.jb51.net/article/35535.htm#t1 setTimeout setTimeout 语法例子 用 setTimeout 来执行 function 不断重复执行的 setTimeout 设定条件使 setTimeout 停止 计分及计秒的 counter clearTimeout Set flag 1. SetTimeOut() 1.1 SetTimeOut()语法例子 1.2 用SetTimeOut()执行Function 1.3 SetTimeO

网页实现自动跳转

两种实现自动跳转的的方法: 第一种方法,没有剩余秒数显示. <meta http-equiv=refresh content='5;url="http://xxxx.com/"' /> 第一种网页自动跳转方法:meta refresh自动跳转法 在网页的head区域的meta refresh标签中,加入自动跳转代码,可实现网页的立即或延时自动跳转. 示例如下: <meta http-equiv="refresh" content="10;

js中的SetTimeOut

1. SetTimeOut()              1.1 SetTimeOut()语法例子              1.2 用SetTimeOut()执行Function              1.3 SetTimeOut()语法例子              1.4 设定条件使SetTimeOut()停止              1.5 计分及秒的counter    2. ClearTimeout()    3. Set Flag   1.setTimeout( ) setT

转: requestAnimationFrame,Web中写动画的另一种选择

HTML5/CSS3时代,我们要在web里做动画选择其实已经很多了: 你可以用CSS3的animattion+keyframes; 你也可以用css3的transition; 你还可以用通过在canvas上作图来实现动画,也可以借助jQuery动画相关的API方便地实现; 当然最原始的你还可以使用window.setTimout()或者window.setInterval()通过不断更新元素的状态位置等来实现动画,前提是画面的更新频率要达到每秒60次才能让肉眼看到流畅的动画效果. 现在又多了一种