CSPP552: Web Programming, JavaScript part 10
Events
Detect changes:
mouse movement
clicks
window changes
etc
Embed in hyperlink annotations (`anchor' tags):
<a href=... >
Example:
<a href="foo.html" onMouseOver="do_stuff(parms); return true;"> blah </a>
The
"do_stuff(parms); return true;"
is event handler code.
Normally a function but may be any JavaScript
Only
in anchor tags (can be confusing!)
Event types include
onMouseOver
,
onMouseOut
,
onClick
, and a whole lot of others.
Next