Event handler for Window
code whenever the user exits a document. The onUnload event handler
is used within either the <BODY> or the <FRAMESET> tag,
and uses the following properties of the Event
type - indicates the type of event
target - indicates the target object to which the event was sent.
The following example shows the onUnload event handler being
used to execute the 'finishOff' function:
Compare to the onload event handler.