DOM: Disable Right Click

By Xah Lee. Date: .

Here is how to disable right click.

document.addEventListener ("contextmenu", e => e.preventDefault(), false);
BUY
Ξ£JS
JavaScript in Depth

DOM Scripting Tutorial

Overview

Basic Examples

HTML Input

Web Scripting Examples

Web Scripting Misc

jQuery

node.js