Sams Teach Yourself JavaScript in 24 Hours

Sams Teach Yourself JavaScript in 24 Hours

By Michael Moncur

DOM Level 0

The Level 0 DOM includes objects that represent the browser window, the current document, and its contents. The following is a basic summary of Level 0 DOM objects.

Window

The window object represents the current browser window. If multiple windows are open or frames are used, there may be more than one window object. These are given aliases to distinguish them:

The window object has three child objects:

Location

The location object contains information about the current URL being displayed by the window. It has a set of properties to hold the different components of the URL:

History

The history object holds information about the URLs that have been visited before and after the current one in the window, and includes methods to go to previous or next locations:

Document

The document object represents the current document in the window. It includes the following child objects:

Navigator

The navigator object includes information about the current browser version:

Share ThisShare This

Informit Network