window~JS for Web

英文+未完
window 对象表示一个包含DOM文档的窗口,其 document 属性指向窗口中载入的 DOM文档 。使用 document.defaultView 属性可以获取指定文档所在窗口。
window 对象实现了 Window 接口,此接口继承自 AbstractView 接口
在标签浏览器(比如Firefox)中,每个标签具有自己的 window 对象
window.resizeTo 和 window.resizeBy 之类的方法会作用于整个窗口而不是 window 对象所属的那个标签
从 EventTarget 接口继承属性

Window.applicationCache 只读

OfflineResourceList 对象提供对窗口的离线资源的访问。

Window.crypto 只读

返回浏览器crypto对象。

Window.dialogArguments 只读

获取在调用 window.showModalDialog() 时传递给窗口的参数(如果它是一个对话框)。这是一个nsIArray。

Window.document 只读

返回对当前窗口所包含文档的引用。

Window.frameElement 只读

返回嵌入窗口的元素,如果未嵌入窗口,则返回null。

Window.frames 只读

返回当前窗口中所有子窗体的数组。

Window.fullScreen

此属性表示窗口是否以全屏显示。

Window.history 只读

返回history对象的引用.

Window.innerHeight

获得浏览器窗口的内容区域的高度,包含水平滚动条(如果有的话).

window.innerWidth

获得浏览器窗口的内容区域的宽度,包含垂直滚动条(如果有的话).

Window.isSecureContext 只读

指出上下文环境是否能够使用安全上下文环境的特征

Window.length 只读

返回窗口中的frames数量。参见window.frames.

Window.location 只读

获取、设置window对象的location, 或者当前的 URL.

Window.locationbar 只读

返回locationbar对象,其可视性可以在窗口中切换

Window.localStorage 只读

返回用来存储只能在创建它的源下访问的数据的本地存储对象的引用

Window.menubar 只读

返回菜单条对象,它的可视性可以在窗口中切换

Window.messageManager

返回窗口的 message manager 对象.

Window.mozAnimationStartTime 只读

返回当前动画循环开始经过的毫秒数

Window.name

获取/设置窗口的名称

Window.navigator 只读

返回对navigator对象的引用

Window.opener

返回对打开当前窗口的那个窗口的引用

Window.outerHeight 只读

返回浏览器窗口的外部高度

Window.outerWidth 只读

返回浏览器窗口的外部宽度

Window.pageXOffset 只读

window.scrollX的别名

Window.pageYOffset只读

window.scrollY的别名

Window.sessionStorage 只读

返回用来存储只能在创建它的源下访问的数据的session storage对象的引用

Window.parent 只读

返回当前窗口或子窗口的父窗口的引用

Window.performance 只读

Returns a Performance object, which includes the timing and navigation attributes, each of which is an object providing performance-related data. See also Using Navigation Timing for additional information and examples.

Window.personalbar 只读

返回personalbar对象,它的可视性可以在窗口中切换

Window.screen 只读

Returns a reference to the screen object associated with the window.

Window.screenX 只读

Returns the horizontal distance of the left border of the user's browser from the left side of the screen.

Window.screenY 只读

Returns the vertical distance of the top border of the user's browser from the top side of the screen.

Window.scrollbars 只读

Returns the scrollbars object, whose visibility can be toggled in the window.

Window.scrollX 只读

Returns the number of pixels that the document has already been scrolled horizontally.

Window.scrollY 只读

Returns the number of pixels that the document has already been scrolled vertically.

Window.self 只读

Returns an object reference to the window object itself.

Window.sessionStorage

Returns a storage object for storing data within a single page session.

Window.top 只读

Returns a reference to the topmost window in the window hierarchy. This property is read only.

Window.window 只读

Returns a reference to the current window.

window[0], window[1], etc.

Returns a reference to the window object in the frames. See Window.frames for more details.

EventTarget.addEventListener()

Register an event handler to a specific event type on the window.

Window.alert()

Displays an alert dialog.

WindowBase64.atob()

Decodes a string of data which has been encoded using base-64 encoding.

WindowBase64.btoa()

Creates a base-64 encoded ASCII string from a string of binary data.

Window.clearImmediate()

Cancels the repeated execution set using setImmediate.

WindowTimers.clearTimeout()

Cancels the repeated execution set using WindowTimers.setTimeout().

Window.close()

Closes the current window.

Window.confirm()

Displays a dialog with a message that the user needs to respond to.

Window.dump()

Writes a message to the console.

Window.find()

Searches for a given string in a window.

Window.focus()

Sets focus on the current window.

Window.getComputedStyle()

Gets computed style for the specified element. Computed style indicates the computed values of all CSS properties of the element.

Window.getSelection()

Returns the selection object representing the selected item(s).

Window.matchMedia()

Returns a MediaQueryList object representing the specified media query string.

Window.minimize() (top-level XUL windows only)

Minimizes the window.

Window.moveBy()

Moves the current window by a specified amount.

Window.moveTo()

Moves the window to the specified coordinates.

Window.open()

Opens a new window.

Window.openDialog()

Opens a new dialog window.

Window.postMessage()

Provides a secure means for one window to send a string of data to another window, which need not be within the same domain as the first.

Window.print()

Opens the Print Dialog to print the current document.

Window.prompt()

Returns the text entered by the user in a prompt dialog.

Window.resizeBy()

Resizes the current window by a certain amount.

Window.resizeTo()

Dynamically resizes window.

Window.scroll()

Scrolls the window to a particular place in the document.

Window.scrollBy()

Scrolls the document in the window by the given amount.

Window.scrollByLines()

Scrolls the document by the given number of lines.

Window.scrollByPages()

Scrolls the current document by the specified number of pages.

Window.scrollTo()

Scrolls to a particular set of coordinates in the document.

Window.setCursor()

Changes the cursor for the current window

Window.setImmediate()

Executes a function after the browser has finished other heavy tasks

Window.showModalDialog()

Displays a modal dialog.

Window.stop()

This method stops window loading.

猜你喜欢

转载自www.cnblogs.com/qq3279338858/p/8951925.html