button

Description

Specifies which mouse button, if any, is pressed.

Syntax

object.button

Settings

This read-only property has one of these values:

0 No button.
1 Left button is pressed.
2 Right button is pressed.
4 Middle button is pressed.

This property is intended to be used with the onmousedown, onmouseup, and onmousemove events. For other events, it typically is zero regardless of the state of the mouse buttons.

Applies To

event