back
Window Events
JavaScript provides a series of handlers dealing with what are called window events. Window events concern how the windows load and unload from the screen. For example, onLoad is an event handler that can change how a new window is displayed on the screen. onUnload works the same way--except it changes what occurs when the user closes a window.

The following example uses both of these handlers plus it creates an array of pages that are randomly displayed using frames. Try refreshing the page several times to see how it randomly selects the pages. Check it out:

Check out these two examples:

example

Assignment
Using the above example as a model, create a folder in your directory named "framestuff," and place five files in it. Give each file a different background color and name each file after a famous person, place, or thing. Then, create an array that randomly loads the pictures into a frame document with five columns.