php禁止复制网页内容功能
来源:互联网 发布:软件开发流程文档 编辑:程序博客网 时间:2024/05/21 11:24
1、在不想被复制内容的php页面中添加引用<script src="../nocopy.js" type="text/javascript"></script>
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
2、同时在网站文件夹中放入nocopy.js文件,当前../nocopy.js表示nocopy.js文件在根文件夹中
3、nocopy.js中的文件内容是:
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
阅读全文
0 0
- php禁止复制网页内容功能
- 禁止网页内容复制
- 禁止复制网页内容
- 禁止访客复制网页内容
- 禁止访客复制网页内容
- 禁止用户复制网页内容(JavaScript)
- 禁止用户复制网页的内容
- 如何禁止 网页的复制功能
- 禁止网页内容复制、选取、禁止右键菜单js代码
- 禁止网页内容复制-粘贴-拷贝-拖曳-选择
- javascript禁止网页内容被复制和右键
- 禁止网页内容复制、另存为、粘贴的简单方案
- 禁止网页内容复制、另存为、粘贴的简单方法
- 网页上javascript禁止让用户复制内容
- 禁止复制文本框内容
- 内容禁止复制
- 页面内容禁止复制
- javascript 禁止复制网页
- 初识 runtime
- PG10 Beat2的安装
- ZOJ 3761 —— Easy billiards(并查集+深搜)
- CopyOnWriteArrayList
- linux 动态库的显示调用
- php禁止复制网页内容功能
- 比赛时需要注意的几个地方
- [LeetCode] 67. Add Binary
- LintCode5
- iOS 如何获取设备的各种信息
- supervisor ERROR (spawn error)
- android 6.0 logcat机制(三)logd处理请求log
- win10运行程序提示“为了对电脑进行保护,已经阻止此应用” 解决方法
- Django 学习笔记之 Class-Based-View