Events
-
event handlers: interact with the user.
-
An event handler is a script that executes when the user invokes
an event.
-
keyboard, mouse, load events.
-
Syntax: eventHandler="script", where
-
eventHandler is the name of the event handler, and
-
script is the script to execute.
-
Note, these scripts are often one line, but can be multiple lines if
you
use the semicolon, and can call functions in other parts of the document.
-
events are associated with objects in the Document Object Model,
covered earlier.
-
onMouseOver works with the <a href> tag, for example,
which is a link object.
-
Proper capitalization is important!
-
on - always lower case
-
MouseOver - propercase the following words.
Creating an Event Handler: Example
Home
Internet II: Day 4