HTML and CSS Reference
In-Depth Information
quickly clicks the mouse button for a second time, the onDblClick event
gets triggered in the browser as well.
If you need to detect both halves of a mouse click as separate events,
use onMouseDown and onMouseUp . When the user presses the mouse but-
ton, the onMouseDown event occurs. The onMouseUp event happens when
the user releases the mouse button.
The onMouseMove , onMouseOut , and onMouseOver events happen when the
user drags the mouse pointer. The onMouseOver event occurs when the
mouse first enters the display region occupied by the associated HTML
element. After entry, onMouseMove events are generated as the mouse
moves about within the element. Finally, when the mouse exits the ele-
ment, onMouseOut occurs.
For some elements, the onFocus event corresponds to onMouseOver , and
onBlur corresponds to onMouseOut .
12.3.3.3. The keyboard events
The HTML 4 and XHTML standards currently support only three events
relating to user keyboard actions: onKeyDown , onKeyUp , and onKeyPress .
The onKeyDown event occurs when the user depresses a key on the key-
board; onKeyUp happens when the key is released. The onKeyPress event
is triggered when a key is pressed and released. Usually, you'll have
handlers for either the up and down events or the composite key-press
event, but not for both.
12.3.3.4. Document events
Most of the document-related event handlers relate to the actions and
states of form controls. For instance, onReset and onSubmit happen when
the user activates the respective reset or submit button. Similarly,
onSelect and onChange occur as users interact with certain form ele-
ments. See Chapter 9 for a detailed discussion of these forms-related
events.
 
Search WWH ::




Custom Search