js对象集锦.....(几个重要的但大家需要百度的)------------window对象
2011-09-11 09:37
519 查看
javascript windows对象
Represents a browser window or frame. This is the top-level object for eachdocument,Location, andHistory object group(官方英文解释)
主要事件:
onBlur
onDragDrop
onError
onFocus
onLoad
onMove
onResize
onUnload
主要属性:
closed : Specifies whether a window has been closed. 窗口是否关闭
defaultStatus : Reflects the default message displayed in the window's status bar. 返回 窗口状态栏信息
document [b] :Contains information on the current document, and provides 方法s for displaying HTML output to the user. 文档对象[/b]
frames [b] :An array reflecting all the frames in a window. 窗口所包含的frames对象[/b]
history [b] :Contains information on the URLs that the client has visited within a window. 包含浏览器所访问过的url对象集合[/b]
innerHeight[b] :
Specifies the vertical dimension, in pixels, of the window's content area. 以像素px为单位返回文档区域的高度;[/b]
innerWidth [b] :Specifies the horizontal dimension, in pixels, of the window's content area. 以像素px为单位返回文档区域的宽度;[/b]
length [b] :The number of frames in the window. 窗口所包含的frames对象长度[/b]
location [b] :Contains information on the current URL. 当前url地址对象信息[/b]
locationbar [b] :Represents the browser window's location bar. 返回当前浏览器地址栏信息[/b]
menubar [b] :
Represents the browser window's menu bar. 返回浏览器菜单栏[/b]
name [b] :A unique name used to refer to this window. 返回当前窗口的名称[/b]
opener [b] :Specifies the window name of the calling document when a window is opened using the open [/b]
outerHeight [b] :Specifies the vertical dimension, in pixels, of the window's outside boundary. 返回窗口的外部边界高度(内容区域以外的)[/b]
outerWidth [b] :Specifies the horizontal dimension, in pixels, of the window's outside boundary. 返回窗口的外部边界宽度(内容区域以外的)[/b]
pageXOffset [b] :Provides the current x-position, in pixels, of a window's viewed page. [/b]
pageYOffset [b] :Provides the current y-position, in pixels, of a window's viewed page.[/b]
parent [b] :A synonym for a window or frame whose frameset contains the current frame. 当一个frames被包含在父窗口则返回父窗口的名称[/b]
personalbar [b] :Represents the browser window's personal bar (also called the directories bar). [/b]
scrollbars [b] :Represents the browser window's scroll bars. 浏览器滚动条对象[/b]
self [b] :A synonym for the current window.[/b]
status [b]
:Specifies a priority or transient message in the window's status bar. 状态栏的瞬间信息[/b]
statusbar [b]
:Represents the browser window's status bar. 状态栏对象[/b]
toolbar [b] :Represents the browser window's tool bar.[/b]
top [b]
:A synonym for the topmost browser window.[/b]
window [b]
:A synonym for the current window. 当前窗口对象
[/b]
back :Undoes the last history step in any frame within the top-level window. 返回上一次浏览记录适用于顶层窗口
blur :Removes focus from the specified object. 移除焦点
captureEvents :Sets the window or document to capture all events of the specified type. 捕捉鼠标事件
clearInterval
:Cancels a timeout that was set with the setInterval 方法。 清除定时器当前窗口定时器对象
clearTimeout :Cancels a timeout that was set with thesetTimeout 方法。
清除定时器当前窗口定时器对象
close :Closes the specified window. 关闭窗口
confirm :Displays a Confirm dialog box with the specified message and OK and Cancel buttons. 显示一个确认对话窗口带有确认取消按钮
disableExternalCapture :Disables external event capturing set by theenableExternalCapture 方法。
enableExternalCapture :Allows a window with frames to capture events in pages loaded from different locations (servers). 允许带框架集对象的窗口捕获事件
find :Finds the specified text string in the contents of the specified window. 在指定的窗口查找指定的字符串对象
focus :Gives focus to the specified object. 指定焦点对象
forward :Loads the next URL in the history list. 在浏览记录中指向下一个地址
handleEvent
: 调用指定事件的控制句柄。
home :Points the browser to the URL specified in preferences as the user's home page.
moveBy [b] :[/b] Moves the window by the specified amounts. 移动窗口
moveTo :Moves the top-left corner of the window to the specified screen coordinates. 移动窗口以左上角为基准到指定的坐标
open :Opens a new web browser window. 打开一个新窗口
print :Prints the contents of the window or frame. 打印内容
prompt :Displays a Prompt dialog box with a message and an input field. 显示一个提示对话窗并可以输入信息
releaseEvents :Sets the window to release captured events of the specified type, sending the event to objects further along the event hierarchy.
resizeBy
:Resizes an entire window by moving the window's bottom-right corner by the specified amount. 改变窗口的大小
resizeTo :Resizes an entire window to the specified outer height and width.
改变窗口的大小(长宽)
routeEvent :Passes a captured event along the normal event hierarchy.
scroll :Scrolls a window to a specified coordinate. 滚动窗口到一个指定的坐标
scrollBy
:Scrolls the viewing area of a window by the specified amount.
scrollTo
:Scrolls the viewing area of the window to the specified coordinates, such that the specified point becomes the top-left corner. 滚动窗口到指定的高度
setInterval :Evaluates an expression or calls a function every time a specified number of milliseconds elapses.
setTimeout
:Evaluates an expression or calls a function once after a specified number of milliseconds has elapsed.
stop
Represents a browser window or frame. This is the top-level object for eachdocument,Location, andHistory object group(官方英文解释)
主要事件:
onBlur
onDragDrop
onError
onFocus
onLoad
onMove
onResize
onUnload
主要属性:
closed : Specifies whether a window has been closed. 窗口是否关闭
defaultStatus : Reflects the default message displayed in the window's status bar. 返回 窗口状态栏信息
document [b] :Contains information on the current document, and provides 方法s for displaying HTML output to the user. 文档对象[/b]
frames [b] :An array reflecting all the frames in a window. 窗口所包含的frames对象[/b]
history [b] :Contains information on the URLs that the client has visited within a window. 包含浏览器所访问过的url对象集合[/b]
innerHeight[b] :
Specifies the vertical dimension, in pixels, of the window's content area. 以像素px为单位返回文档区域的高度;[/b]
innerWidth [b] :Specifies the horizontal dimension, in pixels, of the window's content area. 以像素px为单位返回文档区域的宽度;[/b]
length [b] :The number of frames in the window. 窗口所包含的frames对象长度[/b]
location [b] :Contains information on the current URL. 当前url地址对象信息[/b]
locationbar [b] :Represents the browser window's location bar. 返回当前浏览器地址栏信息[/b]
menubar [b] :
Represents the browser window's menu bar. 返回浏览器菜单栏[/b]
name [b] :A unique name used to refer to this window. 返回当前窗口的名称[/b]
opener [b] :Specifies the window name of the calling document when a window is opened using the open [/b]
outerHeight [b] :Specifies the vertical dimension, in pixels, of the window's outside boundary. 返回窗口的外部边界高度(内容区域以外的)[/b]
outerWidth [b] :Specifies the horizontal dimension, in pixels, of the window's outside boundary. 返回窗口的外部边界宽度(内容区域以外的)[/b]
pageXOffset [b] :Provides the current x-position, in pixels, of a window's viewed page. [/b]
pageYOffset [b] :Provides the current y-position, in pixels, of a window's viewed page.[/b]
parent [b] :A synonym for a window or frame whose frameset contains the current frame. 当一个frames被包含在父窗口则返回父窗口的名称[/b]
personalbar [b] :Represents the browser window's personal bar (also called the directories bar). [/b]
scrollbars [b] :Represents the browser window's scroll bars. 浏览器滚动条对象[/b]
self [b] :A synonym for the current window.[/b]
status [b]
:Specifies a priority or transient message in the window's status bar. 状态栏的瞬间信息[/b]
statusbar [b]
:Represents the browser window's status bar. 状态栏对象[/b]
toolbar [b] :Represents the browser window's tool bar.[/b]
top [b]
:A synonym for the topmost browser window.[/b]
window [b]
:A synonym for the current window. 当前窗口对象
[/b]
方法概览:
alert :Displays an Alert dialog box with a message and an OK button. 弹出窗口(一直在用这个方法,今天才知道是window对象)back :Undoes the last history step in any frame within the top-level window. 返回上一次浏览记录适用于顶层窗口
blur :Removes focus from the specified object. 移除焦点
captureEvents :Sets the window or document to capture all events of the specified type. 捕捉鼠标事件
clearInterval
:Cancels a timeout that was set with the setInterval 方法。 清除定时器当前窗口定时器对象
clearTimeout :Cancels a timeout that was set with thesetTimeout 方法。
清除定时器当前窗口定时器对象
close :Closes the specified window. 关闭窗口
confirm :Displays a Confirm dialog box with the specified message and OK and Cancel buttons. 显示一个确认对话窗口带有确认取消按钮
disableExternalCapture :Disables external event capturing set by theenableExternalCapture 方法。
enableExternalCapture :Allows a window with frames to capture events in pages loaded from different locations (servers). 允许带框架集对象的窗口捕获事件
find :Finds the specified text string in the contents of the specified window. 在指定的窗口查找指定的字符串对象
focus :Gives focus to the specified object. 指定焦点对象
forward :Loads the next URL in the history list. 在浏览记录中指向下一个地址
handleEvent
: 调用指定事件的控制句柄。
home :Points the browser to the URL specified in preferences as the user's home page.
moveBy [b] :[/b] Moves the window by the specified amounts. 移动窗口
moveTo :Moves the top-left corner of the window to the specified screen coordinates. 移动窗口以左上角为基准到指定的坐标
open :Opens a new web browser window. 打开一个新窗口
print :Prints the contents of the window or frame. 打印内容
prompt :Displays a Prompt dialog box with a message and an input field. 显示一个提示对话窗并可以输入信息
releaseEvents :Sets the window to release captured events of the specified type, sending the event to objects further along the event hierarchy.
resizeBy
:Resizes an entire window by moving the window's bottom-right corner by the specified amount. 改变窗口的大小
resizeTo :Resizes an entire window to the specified outer height and width.
改变窗口的大小(长宽)
routeEvent :Passes a captured event along the normal event hierarchy.
scroll :Scrolls a window to a specified coordinate. 滚动窗口到一个指定的坐标
scrollBy
:Scrolls the viewing area of a window by the specified amount.
scrollTo
:Scrolls the viewing area of the window to the specified coordinates, such that the specified point becomes the top-left corner. 滚动窗口到指定的高度
setInterval :Evaluates an expression or calls a function every time a specified number of milliseconds elapses.
setTimeout
:Evaluates an expression or calls a function once after a specified number of milliseconds has elapsed.
stop
相关文章推荐
- window对象的几个重要方法
- js关于document和window对象
- JS:1.7,窗口(window)对象 window.close,window.open
- .net下导致Session失效的一种情况:js教本中使用window.open和window.showModalDialog时需要注意
- js-window对象的方法和属性资料
- js window对象属性和方法记忆
- JS 使用 window对象的print方法实现分页打印功能
- 百度优化必须遵守的几个重要规则
- js定义父类窗口,接收子窗口返回的内容,window.opener.document取得父类窗口的对象.html
- js对象,属性集锦之二
- DNN其中几个重要对象和数据关系图
- jquery的几个重要的对象关系逻辑
- 非常简单的百度定位,只需要几个步骤即可
- .net下导致Session失效的一种情况:js教本中使用window.open和window.showModalDialog时需要注意
- 韩顺平 javascript教学视频_学习笔记27_dom对象(window对象3.history.location.navigator.screen.event)_js事件驱动编程
- [JS]详尽解析window.event对象 --javascript 教程及特效
- JS-window对象集合
- JS中document对象和window对象的区别
- JS获得iframe中的window对象
- 超级实用且不花哨的js代码大全 (四) -----JavaScript[对象.属性]集锦