文章最后更新时间:
这个弹窗个人觉得很好看,一般只有“复制提醒(未附带复制失败提醒)”、“禁用F12”、“禁用鼠标右键”,懒人Blog这里把常见的“禁用Ctrl+U”、“禁用Ctrl+S”、“禁用Ctrl+Shift+I”等都分享给大家,具体可查看本站效果。
所需代码均打包在本文下方,此美化只应用在子比主题,部份主题无法使用,请自行考虑是否下载。
使用步骤
子比主题后台设置-自定义头部核心代码– 加入以下引入代码
复制Ctrl+C提醒
Zibll主题设置 >> 全局&功能 >> 自定义代码 >> 自定义javascript代码 里面加入以下代码
![图片[1] - 子比主题 – 禁用F12、禁用Ctrl+S、禁用Ctrl+U、禁用Ctrl+Shift+I、右键菜单、复制成功、失败提醒任务提醒弹窗代码 - 诺守博客](https://image.nuoso.cn/2025/11/4a47a0db6e20251129142351.png)
![图片[2] - 子比主题 – 禁用F12、禁用Ctrl+S、禁用Ctrl+U、禁用Ctrl+Shift+I、右键菜单、复制成功、失败提醒任务提醒弹窗代码 - 诺守博客](https://image.nuoso.cn/2025/11/fb5c81ed3a20251129142351.png)
禁用鼠标右键菜单提醒
<script>
document.oncontextmenu = function () {
new Vue({
data:function(){
this.$notify({
title: "嗯?没有右键菜单",
message: "复制请用键盘快捷键[Ctrl+C]",
position: 'bottom-right',
offset: 50,
showClose: false,
type:"warning"
});
return{visible:false}
}
})
return false;
}
</script>
![图片[3] - 子比主题 – 禁用F12、禁用Ctrl+S、禁用Ctrl+U、禁用Ctrl+Shift+I、右键菜单、复制成功、失败提醒任务提醒弹窗代码 - 诺守博客](https://image.nuoso.cn/2025/11/10fb15c77220251129142510.png)
禁用F12按键提醒(开发者工具快捷键)
![图片[4] - 子比主题 – 禁用F12、禁用Ctrl+S、禁用Ctrl+U、禁用Ctrl+Shift+I、右键菜单、复制成功、失败提醒任务提醒弹窗代码 - 诺守博客](https://image.nuoso.cn/2025/11/4a47a0db6e20251129142635.png)
禁用Ctrl+Shift+I(开发者工具快捷键)
![图片[5] - 子比主题 – 禁用F12、禁用Ctrl+S、禁用Ctrl+U、禁用Ctrl+Shift+I、右键菜单、复制成功、失败提醒任务提醒弹窗代码 - 诺守博客](https://image.nuoso.cn/2025/11/fb5c81ed3a20251129142643.png)
禁用Ctrl+S(保存网页/文件)
![图片[6] - 子比主题 – 禁用F12、禁用Ctrl+S、禁用Ctrl+U、禁用Ctrl+Shift+I、右键菜单、复制成功、失败提醒任务提醒弹窗代码 - 诺守博客](https://image.nuoso.cn/2025/11/10fb15c77220251129142651.png)
禁用Ctrl+U(查看网页源代码)
![图片[7] - 子比主题 – 禁用F12、禁用Ctrl+S、禁用Ctrl+U、禁用Ctrl+Shift+I、右键菜单、复制成功、失败提醒任务提醒弹窗代码 - 诺守博客](https://image.nuoso.cn/2025/11/09dd8c266220251129142658.png)
<script>
document.onkeydown = function(event) {
if (event.ctrlKey && event.keyCode == 83) { // Ctrl + S
event.preventDefault();
new Vue({
data: function() {
this.$notify({
title: "哎!你瞧瞧你",
message: "网页得换方法保存哦~",
position: 'bottom-right',
offset: 50,
showClose: true,
type: "error"
});
return {
visible: false
}
}
})
return false;
}
if (event.ctrlKey && event.keyCode == 85) { // Ctrl + U
event.preventDefault();
new Vue({
data: function() {
this.$notify({
title: "嘿!Brother",
message: "老弟,源码得换方式获取哦~",
position: 'bottom-right',
offset: 50,
showClose: true,
type: "error"
});
return {
visible: false
}
}
})
return false;
}
if (event.ctrlKey && event.shiftKey && event.keyCode == 73) { // Ctrl + Shift + I
event.preventDefault();
new Vue({
data:function(){
this.$notify({
title:"呐!这个也不行",
message:"还是按点别的吧!",
position: 'bottom-right',
offset: 50,
showClose: false,
type:"error"
});
return{visible:false}
}
})
return false;
}
if (event.keyCode == 123) { // F12
event.preventDefault();
new Vue({
data:function(){
this.$notify({
title:"呃!别瞎按",
message:"你按这个想干嘛!再按就找不到我咯",
position: 'bottom-right',
offset: 50,
showClose: false,
type:"error"
});
return{visible:false}
}
})
return false;
}
};
</script>
禁用左键选择
//禁用左键选择
document.onselectstart = function () {
return false;
}
签到任务提醒
© 版权声明
© 版权声明 All Rights Reserved
THE END




![诺守博客 - 专业的网络资源分享平台![官网]](https://image.nuoso.cn/2025/12/20251205102715204.png)


- 最新
- 最热
只看作者