I hate this mess with the mouse buttons created by W3C an MS! I want to know if the left mouse button is pressed when I get a mousedown event.
I use this code
You can use the following code-
onmouseup="if(window.event.which==1){//code for left click} else if(window.event.which==3){//code for right click}"