Notice that each event handler is a distinct attribute. An event handler script is executed when the corresponding event occurs. As in any other script, you do not need a semicolon after the last statement. As you can see, the event handler requires quotation marks to delimit the specified JavaScript code from the surrounding HTML content. JavaScript requires alternation of single and double quotation marks, so it is sometimes very annoying to have a full-size script in an event handler.
Event handlers accept any script, as long as it's valid.
Many HTML tags support event handlers. In the previous examples we used the tag's onLoad and onUnload event handlers. All Rights Reserved.