- Refresher on the Different Types of Scripting
- Displaying Random Content on the Client Side
- Understanding the Document Object Model
- Using window Objects
- Working with the document Object
- Accessing Browser History
- Working with the location Object
- More About the DOM Structure
- Working with DOM Nodes
- Creating Positionable Elements (Layers)
- Hiding and Showing Objects
- Modifying Text Within a Page
- Adding Text to a Page
- Changing Images Based on User Interaction
- Thinking Ahead to Developing HTML5 Applications
- Q & A
Using window Objects
At the top of the browser object hierarchy is the window object, which represents a browser window. You’ve already used at least one method of the window object: alert(), which displays a message in an alert box.
The window object is the parent object for all the objects we will be looking at in this chapter. Figure 6.2 shows the window section of the DOM object hierarchy and a variety of its objects.
FIGURE 6.2 The window section of the DOM object hierarchy, and some of its children.