Get which mouse button is clicked in JavaScript
Description
The following code shows how to get which mouse button is clicked.
Example
<html>
<body>
<form>
This example uses the which property of the event object to determine
which mouse button is pressed. <br>
<br> <input type="radio"
onClick='alert("Mouse button Number " + event.which + "was pressed.")'>
</form><!-- www . j a v a 2s.c om-->
</body>
</html>