代码改变世界

Js Window Object

2012-08-09 19:39  youxin  阅读(252)  评论(0编辑  收藏  举报

The window object represents an open window in a browser.

If a document contain frames (<frame> or <iframe> tags), the browser creates one window object for the HTML document, and one additional window object for each frame.

alert("An error occurred!")

However, the window object is the highest level JavaScript object, therefore the following code does the same thing:

window.alert("An error occurred!")

事件Event

onunload

onload

onfocus

onblur