Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to disable right click in javascript

// for disabling right click use this as it is 
document.addEventListener('contextmenu', event => event.preventDefault());
event.preventDefault()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #disable #click #javascript
ADD COMMENT
Topic
Name
2+3 =