If you need to determine which mouse button was pressed to trigger the event, this property will contain a value to indicate the button.
Note that on a Macintosh, this value is meaningless as there is only one button on a an Apple Macintosh mouse.
Third party mice can be added to Apple Macintosh systems to provide multiple (2 or 3) button functionality but they are by no means commonplace and it is probably safe to assume only a 1 button mouse on the Macintosh platform.
The values for the buttons are defined to cope with 1, 2 or 3 button mice.
The following values correspond with mouse buttons:
0 - No mouse button was pressed when the event was triggered
1 - The left button was pressed
2 - The right button was pressed
3 - The middle button was pressed
See also: | Event.button, Event.which |
Prev | Home | Next |
MouseEvent.altKey | Up | MouseEvent.clientX |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |