HTML and CSS Reference
What It Affects
When It Happens
Links (and images within links)
When the mouse moves over a link. Return
true to prevent link from showing in the status
When the browser window is moved.
Forms reset button
When the form's Reset button is clicked.
Return false to stop reset.
When the browser window changes size.
When a form element is selected.
When you want to send a form to the server.
Return false to stop submission to the server.
After the document or frameset is closed or
There are two parts to setting up an event handler:
1. The event handler is assigned as an attribute of an HTML tag such as a document,
form, image, or link. If you want the event to affect a document, then it would
become an attribute of the <body> tag; if you want the event to affect a button,
then it would become an attribute of the form's <input> tag; and if you want the
event to affect a link, then it would become an attribute of the <a href> tag. For
example, if the event is to be activated when a document has finished loading, the
onLoad event handler is used, and if the event happens when the user clicks an
input device, such as a button, the onClick event handler is fired up.
<body onLoad ="alert('Welcome to my Web site');">
value="Tickle me "
onClick ="alert('Hee hee ho hee');" />
2. The next step is to register or assign a value to the event handler. The value can
be a built-in method such as alert() or confirm() , a user-defined function, or a
HTML tag, if a user-defined function is assigned to the event handler, then that
ments (separated by semicolons).