HTML and CSS Reference
In-Depth Information
Table G-9 Event Handlers (continued)
Event Handler
Triggered When
Handler For
Used in HTML Statement
onmousedown
A mouse button is
pressed
Button, Document, Link
<a> ... </a>
<input type 5 ”submit” />
<input type 5 ”reset” />
<body> ... </body>
onmouseenter
For use when mouse first
enters element and does
not continue to fire for
all inner elements, unlike
onmouseover
(Internet Explorer only)
All elements
onmouseleave
For use when mouse
leaves element
(Internet Explorer only)
All elements
onmousemove
The mouse moves
Not associated with any
particular object because
the mouse moves so
frequently; must be
specifically associated with
a particular object
<body> ... </body>
onmouseout
The mouse moves off
an element
Layer, Link
<a> ... </a>
<area> ... </area>
onmouseover
The mouse moves over
an element
Layer, Link
<a> ... </a>
<area> ... </area>
onmouseup
A button is released
Button, Document, Link
<a> ... </a>
<input type 5 ”submit” />
<input type 5 ”reset” />
<body> ... </body>
onmousewheel
User scrolls with mouse
wheel (Internet Explorer 6 1 ,
Opera, Safari) Firefox uses
DOMMouseScroll
wheelDelta property to
determine direction and
amount of scroll
All elements
onmove
A window or frame is
moved
Window (Internet
Explorer only)
<body> ... </body>
onoffline
Browser is working
offline
Browser
ononline
Browser is working
online
Browser
onpaste
When user attempts to
paste from Clipboard
Return of false prevents
paste
All <form> elements
onreset
A form resets
Form
<form> ... </form>
onresize
A window or frame
is resized
Window
<body> ... </body>
onselect
A user selects a field in
a form
Text, Textarea
<input type 5 ”text” />
<textarea> ... </textarea>
onsubmit
A user submits a form
Form
<form> ... </form>
onunload
A document unloads
Window
<body> ... </body>
Objects
This section lists the properties, methods, and events of the major JavaScript objects.
Search WWH ::




Custom Search