TypechoJoeTheme

爱微网络科技 - 致力于打造一个分享技术网

登录
用户名
密码
/
注册
用户名
邮箱
输入密码
确认密码

禁止F12元素审查

夏金博主
2022-09-04
/
0 评论
/
696 阅读
/
115 个字
/
百度已收录
09/04
本文最后更新于2023年10月08日,已超过225天没有更新。如果文章内容或图片资源失效,请留言反馈,我会及时处理,谢谢!

很多时候我们辛辛苦苦弄的代码被很多人按一个F12直接白嫖走了,感觉自己的付出被白嫖是不是非常的伤心、郁闷,甚至是气愤、愤怒。 删除线效果 下面和大家介绍一种方式。

直接在页脚文件foot.php或者footer.php最下方放入以下代码:

<script>
function fuckyou(){
window.close(); //关闭当前窗口(防抽)
window.location="about:blank"; //将当前窗口跳转置空白页
}
 
function click(e) {
if (document.all) {
  if (event.button==2||event.button==3) { 
alert("禁止恶意拿代码的");
oncontextmenu='return false';
}
 
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
fuckyou();
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
document.onkeydown =document.onkeyup = document.onkeypress=function(){ 
if(window.event.keyCode == 123) { 
fuckyou();
window.event.returnValue=false;
return(false); 
} 
}
</script>
禁止F12元素审查
朗读
赞(5)
版权属于:

爱微网络科技 - 致力于打造一个分享技术网

本文链接:

https://blog.rr11.cn/index.php/archives/243/(转载时请注明本文出处及文章链接)

评论 (0)

互动读者

人生倒计时

今日已经过去小时
这周已经过去
本月已经过去
今年已经过去个月

最新回复

  1. pjhTkBqKvINUSec闲逛
    2024-03-14
  2. pjhTkBqKvINUSec闲逛
    2024-03-14
  3. pjhTkBqKvINUSec闲逛
    2024-03-14
  4. pjhTkBqKvINUSec闲逛
    2024-03-14
  5. pjhTkBqKvINUSec闲逛
    2024-03-14