js对象集锦.....(几个重要的但大家需要百度的)------------window对象

12 篇文章 0 订阅
8 篇文章 0 订阅

javascript   windows对象

Represents a browser window or frame. This is the top-level object for eachdocument,Location, andHistory object group(官方英文解释)


主要事件:

主要属性:

closed : Specifies whether a window has been closed.  窗口是否关闭

defaultStatus :  Reflects the default message displayed in the window's status bar.  返回 窗口状态栏信息

document   :Contains information on the current document, and provides 方法s for displaying HTML output to the user.   文档对象

frames  :An array reflecting all the frames in a window.   窗口所包含的frames对象

history  :Contains information on the URLs that the client has visited within a window.   包含浏览器所访问过的url对象集合

innerHeight : Specifies the vertical dimension, in pixels, of the window's content area.   以像素px为单位返回文档区域的高度;

innerWidth  :Specifies the horizontal dimension, in pixels, of the window's content area.    以像素px为单位返回文档区域的宽度;

length  :The number of frames in the window.   窗口所包含的frames对象长度

location  :Contains information on the current URL.  当前url地址对象信息

locationbar   :Represents the browser window's location bar.   返回当前浏览器地址栏信息

menubar   : Represents the browser window's menu bar.  返回浏览器菜单栏

name   :A unique name used to refer to this window.   返回当前窗口的名称

opener    :Specifies the window name of the calling document when a window is opened using the open 

outerHeight  :Specifies the vertical dimension, in pixels, of the window's outside boundary.   返回窗口的外部边界高度(内容区域以外的)

outerWidth   :Specifies the horizontal dimension, in pixels, of the window's outside boundary.  返回窗口的外部边界宽度(内容区域以外的)

pageXOffset   :Provides the current x-position, in pixels, of a window's viewed page. 

pageYOffset   :Provides the current y-position, in pixels, of a window's viewed page.

parent   :A synonym for a window or frame whose frameset contains the current frame.   当一个frames被包含在父窗口则返回父窗口的名称

personalbar   :Represents the browser window's personal bar (also called the directories bar). 

scrollbars   :Represents the browser window's scroll bars.   浏览器滚动条对象

self   :A synonym for the current window.

status  :Specifies a priority or transient message in the window's status bar.  状态栏的瞬间信息

statusbar  :Represents the browser window's status bar.   状态栏对象

toolbar  :Represents the browser window's tool bar.

top  :A synonym for the topmost browser window.

window  :A synonym for the current window.   当前窗口对象

方法概览:
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.   返回上一次浏览记录适用于顶层窗口
clearInterval  : Cancels a timeout that was set with the setInterval 方法。  清除定时器当前窗口定时器对象
clearTimeout  : Cancels a timeout that was set with the setTimeout 方法。  
清除定时器当前窗口定时器对象
close  : Closes the specified window.  关闭窗口
confirm  : Displays a Confirm dialog box with the specified message and OK and Cancel buttons.   显示一个确认对话窗口带有确认取消按钮
find  : Finds the specified text string in the contents of the specified window.   在指定的窗口查找指定的字符串对象
focus  : Gives focus to the specified object.   指定焦点对象
open  : Opens a new web browser window.   打开一个新窗口
prompt  : Displays a Prompt dialog box with a message and an input field.   显示一个提示对话窗并可以输入信息
resizeTo  : Resizes an entire window to the specified outer height and width.   
改变窗口的大小(长宽)



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值