当前位置: 首页 > news >正文

昆山自适应网站建设教育培训平台

昆山自适应网站建设,教育培训平台,宣传平台有哪些类型,北京免费分类信息发布网1.禁止鼠标左右键代码/禁止网页选中/禁止另存为/防复制代码 按 CtrlC 复制代码 按 CtrlC 复制代码 2.禁止鼠标左右键 1 <SCRIPT languagejavascript>2 <!--3 if (window.Event)4 document.captureEvents(Event.MOUSEUP);5 function nocontextmenu(){6 event.cancelBub…

1.禁止鼠标左右键代码/禁止网页选中/禁止另存为/防复制代码

按 Ctrl+C 复制代码
按 Ctrl+C 复制代码

2.禁止鼠标左右键

复制代码
 1 <SCRIPT language=javascript>2 <!--3 if (window.Event)4 document.captureEvents(Event.MOUSEUP);5 function nocontextmenu(){6 event.cancelBubble = true7 event.returnValue = false;8 return false;9 }
10 function norightclick(e){
11 if (window.Event){
12 if (e.which == 2 || e.which == 3)
13 return false;
14 }
15 else
16 if (event.button == 2 || event.button == 3){
17 event.cancelBubble = true
18 event.returnValue = false;
19 return false;
20 }
21 }
22 document.oncontextmenu = nocontextmenu; // for IE5+
23 document.onmousedown = norightclick; // for all others
24 //-->
25 </SCRIPT>
复制代码

3.禁止选中代码

复制代码
1 <SCRIPT language=JavaScript>
2 document.οncοntextmenu=new Function("event.returnValue=false;");
3 document.onselectstart=new Function("event.returnValue=false;");
4 </SCRIPT>

 

复制代码

4.禁止另存为

1 <noscript>
2 <iframe src="/*.htm"></iframe>
3 </noscript>

5.防拷贝/复制代码

1 <body leftmargin=0 topmargin=0 >

6.禁止选择文本

复制代码
 1 <script type="text/javascript">2 var omitformtags=["input", "textarea", "select"]3 omitformtagsomitformtags=omitformtags.join("|")4 function disableselect(e){5 if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)6 return false7 }8 function reEnable(){9 return true
10 }
11 if (typeof document.onselectstart!="undefined")
12 document.onselectstart=new Function ("return false")
13 else{
14 document.οnmοusedοwn=disableselect
15 document.οnmοuseup=reEnable
16 }
17 </script>
复制代码

7.禁止网页另存为

1 <noscript><iframe src="/*.html>";</iframe></noscript>

8.禁止选择文本

复制代码
 1 <script type="text/javascript">2 3 var omitformtags=["input", "textarea", "select"]4 5 omitformtagsomitformtags=omitformtags.join("|")6 7 function disableselect(e){8 if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)9 return false
10 }
11 
12 function reEnable(){
13 return true
14 }
15 
16 if (typeof document.onselectstart!="undefined")
17 document.onselectstart=new Function ("return false")
18 else{
19 document.οnmοusedοwn=disableselect
20 document.οnmοuseup=reEnable
21 }
22 </script>
复制代码

9.禁用右键

复制代码
1 <script>
2 function stop(){
3 return false;
4 }
5 document.οncοntextmenu=stop;
6 </script>
复制代码

10.真正的鼠标右键屏蔽

复制代码
 1 <script language="JavaScript">2 <!--3 4 if (window.Event)5  document.captureEvents(Event.MOUSEUP);6 7 function nocontextmenu()8 {9 event.cancelBubble = true
10 event.returnValue = false;
11 
12 return false;
13 }
14 
15 function norightclick(e)
16 {
17 if (window.Event)
18 {
19  if (e.which == 2 || e.which == 3)
20  return false;
21 }
22 else
23  if (event.button == 2 || event.button == 3)
24  {
25  event.cancelBubble = true
26  event.returnValue = false;
27  return false;
28  }
29 
30 }
31 
32 document.oncontextmenu = nocontextmenu; // for IE5+
33 document.onmousedown = norightclick; // for all others
34 //-->
35 </script>
复制代码

转载于:https://www.cnblogs.com/red-fox-qhq/p/4249593.html

http://www.hkea.cn/news/647975/

相关文章:

  • 南京平台公司seo搜索培训
  • 横沥网站建设武汉百度百科
  • 百度给做网站公司线上运营的5个步骤
  • 盘锦网站建设公司网络营销策略包括哪些
  • 简述电子商务网站开发的基本原则一站式网络营销
  • 商丘网站网络推广员的工作内容和步骤
  • 取消wordpress邮箱认证北京搜索优化排名公司
  • 千库网素材南宁seo优势
  • 西安机场商务宾馆百度做网站怎么在百度上做网站
  • ps网站建设seo网络公司
  • 网站建设步骤 教 程网站怎么做谷歌推广
  • 网站制作需要注意什么潍坊做网站哪家好
  • 专门做团购的网站有哪些色盲图
  • 百度做网站续费费用百度营业执照怎么办理
  • 深圳网站建设方维网络企业网站制作要求
  • 制作好网站黑帽seo教程
  • 云南 网站建设网站seo优化对网店的推广的作用为
  • 网站建设免费国外舆情服务公司
  • 怎么做网站banner查排名网站
  • 做网站好看的背景图片相关搜索优化软件
  • 怎么查网站是哪家制作公司做的百度收录查询
  • 企业年金交了有好处吗网络优化工程师吃香吗
  • python做网站开发百度6大核心部门
  • 自己做网站平台企业网站优化价格
  • 淘宝网网站建设的需求分析百度会员登录入口
  • 建网站的专业公司推广网站多少钱
  • 网站不去公安局备案自己怎么搭建网站
  • 外贸网站建设入门深圳网络推广哪家
  • 网站模板资源公司网站推广
  • 广东省建设教育协会官方网站首页html简单网页代码