secsafe

网页禁用右键和开启了复制限制没有了右键功能的处理办法如下:

先分享一下代码:

<script>

document.onkeydown = function(e){

var e=e||event;

if (e.ctrlKey==1 && e.keyCode==67){

return false;

}

}//防止ctrl+C

document.body.oncopy = function (){return false;} //阻止复制

</script> 
<script> document.body.onselectstart=document.body.oncontextmenu=function(){return false;};</script>

解除网页右键复制限制也就是找到类似这块的js代码去删除即可。

onselectstart

分类:

技术点:

相关文章: