禁止选择文本和禁用右键 v3.0
禁止选中字体(注:在火狐浏览器没有起到效果作用)
<script> function disableselect(e) { var omitformtags = ["input", "textarea", "select"]; omitformtags = omitformtags.join("|"); if (omitformtags.indexOf(e.target.tagName.toLowerCase()) == -1); return false }; function reEnable() { return true }; if (typeof document.onselectstart != "undefined") document.onselectstart = new Function("return false"); else { document.onmousedown = disableselect(); document.onmouseup = reEnable() } </script>
转载请注明出处: 欢迎留言或qq(1090413588)交流