javascript可以实现禁止网页选择内容,只需要下面两个步骤即可:
1、在body中加入onmouseup="document.selection.empty()" onselectstart="return noselect()"两个事件:
<body onmouseup="document.selection.empty()" onselectstart="return noselect()">2、把下面这个javascript函数加入到网页header里面:
<script type="text/javascript"> / 禁止网页选择内容 function noselect() { event.returnValue=false; } </script>想了了解javascript禁止网页复制可参考:javascript禁止网页复制