<script type="text/javascript"> //禁止ctrl复制 document.onkeydown=function(){ if((event.ctrlKey) && (window.event.keycode==67)){ event.returnValue=false; alert("Ctrl+C被禁止啦!"); } } document.onmousedown=function(){ if(event.button==2){ event.returnValue=false; alert("右键被禁止啦!"); } } </script>
本文介绍了一种通过JavaScript实现的简单方法来禁用网页上的Ctrl+C复制操作及鼠标右键菜单,以此保护网页内容不被轻易复制。
389

被折叠的 条评论
为什么被折叠?



