The HTML events DOM specific events are related to the Window / Frame object.

Details about the Window and Frame object can be find under this link.

The HTML events are added in DOM level 2 and they are listed, as well as their descriptions, in the following table:

The HTML events added in DOM level 2

Events

Description

onload

Fires when web-page is loaded

onunload

Fires when browser window is closed.

onabort

Fires on object element if it is not fully loaded and user has stopped

onbeforeunload

Fires when document is about to be unloaded

onerror

Fires on window element when JS error occurs or when <img> or <object> element cannot be laoded or if frames cannot be loaded.

onhashchange

Fires when anchor part of URL is changed

onpageshow

Fires when user navigates to a webpage

onpagehide

Fires when the web-page is sent to background and user navigates away from the page

onresize

Fires when window or frame is resized

onscroll

Fires when scroll bar is moved. Scroll bar is in <body> element of the web-page.

More information about HTML Window events can be found in HTML5 Tutorial.

 

›› go to examples ››