buttons property
Gets a value that indicates which mouse buttons a user pressed.
![]() ![]() |
Syntax
| JavaScript | |
|---|
Property values
Type: Number
0
-
Default. No button is pressed.
1
-
The left mouse button is pressed.
2
-
The right mouse button is pressed.
3
-
The left and right mouse buttons are pressed.
4
-
The wheel (middle) mouse button is pressed.
5
-
The left and wheel (middle) mouse buttons are pressed.
6
-
The right and wheel (middle) mouse buttons are pressed.
7
-
All three buttons are pressed.
Standards information
- Document Object Model (DOM) Level 3 Events Specification, Section 5.2.3
See also
Send comments about this topic to Microsoft
Build date: 1/23/2013

