right click disable/enable html code example Example: disable right click document.addEventListener('contextmenu', event => event.preventDefault());