These events, loading and unloading a page, are the two document level events that can be handled by JavaScript. This means that it is possible to write JavaScript code, contained within the HTML definition of a page, that will be executed whenever that page is loaded.
You can also have code that is executed whenever that page is unloaded.
Leave a Reply
You must be logged in to post a comment.