当前位置:网站首页>网站页面禁止复制内容 JS代码
网站页面禁止复制内容 JS代码
2022-07-05 16:12:00 【withkai44】
在你的网页位置添加上这部分js代码
document.onselectstart = new Function('return false');
document.oncontextmenu = new Function('return false');
if (window.sidebar) {
document.onmousedown = new Function('return false');
document.onclick = new Function('return true');
document.oncut = new Function('return false');
document.oncopy = new Function('return false');
}
document.addEventListener('keydown', function (e) {
if (e.keyCode === 83 && (navigator.platform.match('Mac') ? e.metaKey : e.ctrlKey)) {
e.preventDefault();
e.stopPropagation();
}
}, false);
边栏推荐
- 迁移/home分区
- 养不起真猫,就用代码吸猫 -Unity 粒子实现画猫咪
- Flet教程之 09 NavigationRail 基础入门(教程含源码)
- 求解汉诺塔问题【修改版】
- PHP 严格模式
- 【深度学习】深度学习如何影响运筹学?
- Intel 13th generation Raptor Lake processor information exposure: more cores, larger cache
- 详解SQL中Groupings Sets 语句的功能和底层实现逻辑
- How to install MySQL
- Pspnet | semantic segmentation and scene analysis
猜你喜欢
[61dctf]fm
Bs-xx-042 implementation of personnel management system based on SSM
2020-2022 two-year anniversary of creation
How does win11 change icons for applications? Win11 method of changing icons for applications
Jarvis OJ Webshell分析
Summary of methods for finding intersection of ordered linked list sets
Enter a command with the keyboard
Jarvis OJ 远程登录协议
Data access - entityframework integration
【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识
随机推荐
Dare not buy thinking
Summary of methods for finding intersection of ordered linked list sets
Data access - entityframework integration
Explain in detail the functions and underlying implementation logic of the groups sets statement in SQL
Jarvis OJ shell流量分析
Quelques réflexions cognitives
Can you help me see what the problem is? [ERROR] Could not execute SQL stateme
The new version of effect editor is online! 3D rendering, labeling, and animation, this time an editor is enough
[echart] resize lodash 实现窗口缩放时图表自适应
One click installation script enables rapid deployment of graylog server 4.2.10 stand-alone version
[61dctf]fm
有序链表集合求交集 方法 总结
PHP strict mode
If you can't afford a real cat, you can use code to suck cats -unity particles to draw cats
Enterprise backup software Veritas NetBackup (NBU) 8.1.1 installation and deployment of server
Games101 notes (III)
面对新的挑战,成为更好的自己--进击的技术er
解决CMakeList find_package找不到Qt5,找不到ECM
Oneforall installation and use
服务器的数据库连不上了2003,10060“Unknown error“【服务已起、防火墙已关、端口已开、netlent 端口不通】