[Contents] [Previous] [Next] [Index]

onMouseDown

Executes JavaScript code when a MouseDown event occurs; that is, when the user depresses a mouse button.

Event handler for

Button, document, Link

Implemented in

Navigator 4.0

Syntax

onMouseDown="handlerText"

Parameters

handlerText
JavaScript code or a call to a JavaScript function.

Event properties used

type
Indicates the type of event.

target
Indicates the object to which the event was originally sent.

layerX, layerY,
pageX, pageY,
screenX, screenY
Represent the cursor location at the time the MouseDown event occurred.

which
Represents 1 for a left-mouse-button down and 3 for a right-mouse-button down.

modifiers
Contains the list of modifier keys held down when the MouseDown event occurred.

Description

If onMouseDown returns false, the default action (entering drag mode, entering selection mode, or arming a link) is canceled.

Arming is caused by a MouseDown over a link. When a link is armed it changes color to represent its new state.

See also

For general information on event handlers, see "General Information about Events".

For information about the event object, see event.


[Contents] [Previous] [Next] [Index]

Last Updated: 10/31/97 16:34:02


Copyright © 1997 Netscape Communications Corporation