To determine whether the user clicked the left or right button, you can use the following properties.
If the value of these properties is 1, the event occurred for the left button. In the following example, the onMouseDown event handler displays the messages Left button or Right button, depending on the mouse button you actually have clicked. The messages will appear on your browser’s status bar. Click or right-click anywhere on this page to see it work: