In the previous code in this chapter we’ve already used many parts of the
object. The Window
method, the Alert
object, and the Location
object and its descendants are all subordinate to the grand-daddy of them all, the Document
object.Window
The table below shows the properties, methods, and events supported by the
object. The entries in the Properties column that include the string (object) are objects in themselves, accessible through the Window
object.Window
Properties | Methods | Events |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(object) |
|
|
|
|
|
|
|
|
(object) |
||
(object) |
||
(object) |
||
(object) |
We’ll leave the descendant objects for now, and concentrate on the rest of the
object—don’t worry, there’s plenty to keep us occupied for a while. In the following examples, we’ll explicitly use the current Window
object for the sake of clarity. Don’t forget that, since Window
is the default object on the page, most code will work identically without a qualifying Window
prefix (note that we always have to use it when declaring an event handler like Window
).Window_onLoad