All Event Handlers
EVENT HANDLER: onDblClick
onDblClick
= myJavaScriptCode
Event handler for
Document
,
Link
.
The
onDblClick
event handler executes the specified JavaScript code or function on the occurance of a double click event.
The
onDblClick
event handler uses the following
Event
object properties.
type
- this property indicates the type of event.
target
- this property indicates the object to which the event was originally sent.
layerX
- the cursor location when the click event occurs.
layerY
- the cursor location when the click event occurs.
pageX
- the cursor location when the click event occurs.
pageY
- the cursor location when the click event occurs.
screenX
- the cursor location when the click event occurs.
screenY
- the cursor location when the click event occurs.
which
- 1 represents a left mouse double-click and 3 a right double-click.
modifiers
- lists the modifier keys (shift, alt, ctrl, etc.) held down when the click event occurs.
The following example shows the use of the
onDblClick
event handler with a
document
object. As you can see, this is defined within the document's HTML <BODY> tag.
Code:
<body onDblClick = "document.write('Hello World!')">
NOTE:
Macintosh platforms don't support mouse double-clicks and therefore this event handler is not implemented.
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information