JavaScript-右键菜单禁止/解除

使用oncontextmenu返回false禁止,返回true解除

document.oncontextmenu = function (e) {
        return true;//开启右键
    }

猜你喜欢

转载自blog.csdn.net/weixin_42776027/article/details/113780743