disable right click using javascript code example
Example 1: javascript disable right click
document.addEventListener('contextmenu', event => event.preventDefault());
Example 2: disable mouse right click javascript
document.oncontextmenu = document.body.oncontextmenu = function() {return false;}