最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
FLASH中检测与右键屏蔽实例
时间:2022-06-28 22:17:12 编辑:袖梨 来源:一聚教程网
代码如下 | 复制代码 |
var so = new SWFObject("FL.swf", "flash", "800", "600", "9", "#CCCCCC"); so.addParam("wmode", "opaque"); so.write("flashcontent"); function callFlash(){ //alert("中键"); document.getElementById("flash").onClick(); } if(window.addEventListener){ window.addEventListener("mousedown",function(e){ if(e.button==1)callFlash(); //屏蔽右键 if(e.button==2){ if (e.stopPropagation) e.stopPropagation(); if (e.preventDefault) e.preventDefault(); if (e.preventCapture) e.preventCapture(); if (e.preventBubble) e.preventBubble(); } },true); }else{ document.getElementById("flashcontent").onmousedown=function(){ if(event.button==4)callFlash(); //屏蔽右键 if(event.button==2){ document.oncontextmenu=function(){return false;}; this.setCapture(); this.onmouseup=function(){ this.releaseCapture(); } } } } |
http://www.111com.net/down/FLASH中键检测与右键屏蔽.rar
相关文章
- 不思议迷宫神农试炼怎么过 05-17
- 《支付宝》蚂蚁庄园6月18日答案2022 05-17
- 欢乐钓鱼大师体验模式怎么开启 05-17
- 不思议迷宫咒灵试炼怎么过 05-17
- 崩坏星穹铁道如狼成就怎么获取 05-17
- DNF手游安图恩困难模式怎么打 DNF手游安图恩困难模式攻略技巧 05-17