Search This Blog

2017/05/25

Forbid right click call menu and copy

By html:
<body oncontextmenu='return false;' oncopy='return false;'>
oncontextmenu='return false;' // Return false to forbid right click menu.
oncopy='return false;' // Return false to forbid copy context.

By JavaScript:
document.addEventListener('contextmenu', event => event.preventDefault());