<body onselectstart="return false;" oncontextmenu="alert('请尊重本网站版权!');return false;" onkeydown="if(event.keyCode==27) return false;"><script type="text/javascript">document.onmousedown = click; //绑定禁用鼠标右键事件document.onkeydown = ctrl_key; //绑定禁用键盘事件function click() {if (event.button == 2)//单击的鼠标键为右键{alert('请尊重本网站版权!');return false;}}function ctrl_key() {if (event.keyCode == 17) {//禁用CTRL+S 保存网页代码window.alert("请尊重本网站版权!");return false;}if (event.keyCode == 123) {//禁用F12查看源代码alert('请尊重本网站版权!');return false;}}</script>
如果觉得《禁止用户复制防止被扒站偷东西的代码》对你有帮助,请点赞、收藏,并留下你的观点哦!