In this example, the onLoad event handler calls the alert() method of the window object automatically, as soon as you open this page.