Name
EVENT — NN n/a IE 4 HTML n/a
Synopsis
EVENT=”eventName"
Optional
Internet Explorer 4’s event model allows binding of object
events to SCRIPT
elements with the help of the
EVENT
and FOR
attributes. As
the page loads, the browser registers each SCRIPT
element with its event and object binding so that when the object
generates the event, the script statements inside the
SCRIPT
element execute—without having to
write event handlers for the objects or wrap the script statements
inside function definitions. Event values are written either as
unquoted event names or as quoted event names formatted as functions
(with trailing parentheses and optional parameter names). Use this
type of script-event binding only in Internet Explorer. Navigator
attempts to execute the script statements while the page loads.
Example
<SCRIPT FOR=window EVENT=onresize> ... </SCRIPT>
Value
Case-sensitive event name (unquoted) or the event name as a function
inside a quote pair. The object described in the
FOR
attribute must support the event named in the
EVENT
attribute.
Default
None.
Object Model Reference
- IE
[window.]document.all.elementID.event
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.