<script type="text/javascript">
//禁止鼠标右键
document.oncontextmenu = function(){
return false;
}
//禁止元素被选中
if (typeof(document.onselectstart) != 'undefined') {
// IE chrome下禁止元素被选中
document.onselectstart = function(){
return false;
}
} else {
// firefox下禁止元素被选中的变通办法
document.write('<style type="text/css">body { -moz-user-select: none; }</style>');
}
</script>
JS禁止网页被复制以及禁止鼠标右击代码
最新推荐文章于 2023-06-17 20:24:51 发布