Answers for "how to disable right click in javascript"

8

javascript disable right click

document.addEventListener('contextmenu', event => event.preventDefault());
Posted by: Guest on March-04-2020
3

how to disable right click in javascript

// for disabling right click use this as it is 
document.addEventListener('contextmenu', event => event.preventDefault());
event.preventDefault()
Posted by: Guest on July-20-2020

Code answers related to "how to disable right click in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language