Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript prevent contextmenu

document.getElementById("myDIV").addEventListener("contextmenu", myFunction);

function myFunction(event) {
  event.preventDefault();
 
}
Source by jsfiddle.net #
 
PREVIOUS NEXT
Tagged: #javascript #prevent #contextmenu
ADD COMMENT
Topic
Name
3+8 =