right click javascript event listener code example
Example 1: click left event listener javascrip
object.addEventListener("contextmenu", myScript);
Example 2: javascript event right click
function rightclick() {
var rightclick;
var e = window.event;
if (e.which) rightclick = (e.which == 3);
else if (e.button) rightclick = (e.button == 2);
alert(rightclick); // true or false, you can trap right click here by if comparison
}