📜  如何在javascript代码示例中禁用右键单击

📅  最后修改于: 2022-03-11 15:04:25.628000             🧑  作者: Mango

代码示例2
// for disabling right click use this as it is 
document.addEventListener('contextmenu', event => event.preventDefault());
event.preventDefault()