解除网页限制(禁止右键,复制,f12,文字选择)

解除网页限制(禁止右键,复制,f12,文字选择)

星扬
2022-05-29 / 0 评论 / 1,742 阅读 / 正在检测是否收录...

解除禁止操作

可以ctrl+p打开打印,然后就可以在弹出的窗口愉快的复制了,
没有禁止f12可以直接按f12,如果被限制就按ctrl+shift+i打开,或浏览器菜单开发者工具
进入开发者工具点击控制台,输入以下内容

// 开启右键菜单
document.oncontextmenu = function(){ return true; };
// 开启文字选择
document.onselectstart = function(){ return true; };
// 开启复制
document.oncopy = function(){ return true; };
// 开启剪切
document.oncut = function(){ return true; };
// 开启粘贴
document.onpaste = function(){ return true; };
// 开启F12键
document.onkeydown = function () {
    if (window.event && window.event.keyCode == 123) {
        event.keyCode = 0;
        event.returnValue = true;
        return true;
    }
};
3

评论 (0)

取消