showing results for - "javascript detect right click"
María
06 Jan 2017
1document.body.onclick = function (e) {
2    var isRightMB;
3    e = e || window.event;
4
5    if ("which" in e)  // Gecko (Firefox), WebKit (Safari/Chrome) & Opera
6        isRightMB = e.which == 3; 
7    else if ("button" in e)  // IE, Opera 
8        isRightMB = e.button == 2; 
9
10    alert("Right mouse button " + (isRightMB ? "" : " was not") + "clicked!");
11} 
queries leading to this page
detect left click javascriptdetecting right click by javascriptdetect if i left click javascripthow to make right click do things in javascriptdetect right click of an itemjs detect right mouse clicktypescript check left or right clickdetect right clickjs mouse right click eventjs detect when right clickedjs onclick right clickleft mouse click eventjs detect right click menuhow to detect click with javascriptjs on right mouse clickmouse right click not working javascriptmouse right click eventjavascript check if event was right clickhow to make right click in mouse do something else javascriptright click mouse jsright click mouse event javascripthow to detect when the user right click on something htmlon mouse right click event in javascriptdetect right mouse click javascriptjs mouse right clickdetect right click javascriptjavascript get element that is right clickedget right mouse button event javascripthtml check on right clickright button click javascriptjavascript left mouse clickhtml onclick right clickhtml mouse right button clickjavascript detect right mouse clickclick mouse rigth javascriptjavascript detect right clickright click detection jsmouse click right eventclick right mouse javascripttriger function on right clickhow to make mouse right click work on javascripton left mouse click javascriptjs check right clickevent rightclick mousehow to tell when an object is right clicked jstrigger function on right click on element jsright mouse button numbetjavascript how to real click right clickonclick right clickjavascript determine if left click or right clickonclick html and javascript left right clickjavascript mouse right click eventjavascript on mouse right clickdetect mouse click javascriptjavascript if is right clickjow to detect right clicks in javascriptevent click right mousejavascript detect right click event on atagjs detect right clickonclick but right clickcheck right click event in javascriptright mouse click jshtml right click keycodejs detect left clickhow to detect right click in javascriptjavascript check if rightlickright click detect javascriptjavascript right click key codenodejs gkm detect left or right clickjs right mouse click eventtest for rightclick javascriptjavascript detect left clickdetect long right click javascripthow to detect right click jshow to detect right click in jscheck if right mouse click angularon mouse left click javascriptonclick right click jsright click and left click function jsjavascript if right button clickedjs on mouse right clickright click javascriptonclick right htmljavascript check if right clickjavascript right mouse clickdetect right click javascript by event buttonright click mouse eventright mouse button codecheck if someone right click javascriptdetect right click htmlright click js ifhow to see if a button was right clicked javascriptjavascript mouse rightclick how to look for a right click in javascriptevent angular check it right clickmouse left click event in javascriptdetecdt right clicks jsjavascript right button click eventclick in a button right button javascriptjs mouse right keyrightmouse click event javascriptjavascript right click mouse eventshtml if right clickkey event mouse right clickmouse right click in javascripthow to make right mouse click an onclick eventdetect right click jsright click alert javascripti want to right click on mouse using javascript 5chow can i detect a right click event in javascriptdetect right click domjavascript mouse right clickjs rightclick mouse click bodya script for an alert when mouse right click is done javascriptrigth clic mouse eventsright mouse click js eventhow to check right click in javascript how to check for right click event javascriptjavascript sense right clickmouse event right clickdetect right click javascript elementhow to detect right click in htmlcheck if right click javascriptjavascript listen to mouse rightclicktriger function on right click jshow to change mouse event button left to right in javascriptright click window in jsjavascript right mouse click eventmouse right click jsdetecting right click on windowsmouse right click hsif left click or right click statement in javascriptjavascript trigger right click on image with alertmouse left to right click javascriptdetect right click on html elementmouse right click javascriptjavascript check left right clickhow to enable a elemnt to be onclick and onrightclick jsget event click right mousejavascript detect right click