Javascript 5
Javascript 5
onLoad
Is activated after the HTML page is completed
loaded
onUnload
Is activated when the user exits a HTML page.
9-1
JAVASCRIPT EVENTS CS114
onClick
Is activated when the user clicks an object that
accepts such an event. For example, clicking on a
radio button.
onMouseOver
Occurs when the mouse crosses over an object.
For example over a hyperlink or an image.
onMouseOut
Occurs when the mouse leaves an object.
9-2
CS114 JAVASCRIPT EVENTS
9-3
JAVASCRIPT EVENTS CS114
onFocus
Occurs when an objects is selected. Can be used only with text,
text area, password and select objects.
onBlur
Occurs when an object is no longer in focus. Applies to text,
textarea, password and select objects.
onChange
Is activated whenever an object has lost focus and it’s value has
been changed. Applies to text, textarea, password and select
objects.
onSelect
Event occurs when the user highlights text in a text, text area or
password object.
onSubmit
Is used with form object. Occurs when a user submits a form.
onReset
Counterpart to OnSubmit. Occurs when the user clicks the Reset
button.
9-4
CS114 JAVASCRIPT EVENTS
9-5
JAVASCRIPT EVENTS CS114
9-6
CS114 JAVASCRIPT EVENTS
14.0 Bibliography
9-7