js禁止用户右键等操作
<script type="text/javascript">
document.oncontextmenu=function(){return false};
document.ondragstart=function(){return false};
document.onselectstart =function(){return false};
document.onselect=function(){document.selection.empty();};
document.oncopy=function(){document.selection.empty();};
document.onbeforecopy=function(){return false};
document.onmouseup=function(){document.selection.empty();};
</script>
document.oncontextmenu=function(){return false};
document.ondragstart=function(){return false};
document.onselectstart =function(){return false};
document.onselect=function(){document.selection.empty();};
document.oncopy=function(){document.selection.empty();};
document.onbeforecopy=function(){return false};
document.onmouseup=function(){document.selection.empty();};
</script>
如果认为此文对您有帮助,别忘了支持一下哦!
声明:本博客原创文字只代表本人工作中在某一时间内总结的观点或结论,与本人所在单位没有直接利益关系。转载时请在文章页面明显位置给出原文链接。