|
23 Events
..Starting with 4.0, HTML can trigger events in the browser. An event attribute and the action
to be taken are placed in an HTML tag.
The format is:
<
tag
attribute
=
"script"
>
where script is either script statements or the name of a script to be executed
Where attribute is one of the following:
onload body, frameset
onunload script body, frameset
onchange form elements - value is changed
onsubmit form elements - form is submitted
onreset form elements - form is reset
onselect form elements - element is selected
onblur form elements - element loses focus
onfocus form elements - element gets focus
The rest of these attributes are not valid in the following elements:
base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, and title elements.
onkeydown key is pressed
onkeypress key is pressed and released
onkeyup key is released
onclick mouse click
ondblclick mouse double-click
onmousedown mouse button is pressed
onmousemove mouse pointer moves
onmouseout mouse pointer moves out of an element
onmouseover mouse pointer moves over an element
onmouseup mouse button is released
|