最新下载
热门教程
- 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(); } } } } |
https://www.111cn.net/down/FLASH中键检测与右键屏蔽.rar
相关文章
- 龙族卡塞尔之门七原罪傲慢角色如何 09-18
- 鹅鸭杀保镖有什么玩法技巧 09-18
- 鸣潮夏空复刻要抽吗-2.6夏空复刻抽取建议 09-18
- 嘟嘟脸恶作剧玛卡莎技能效果怎么样 09-18
- 地下城堡4骑士与破碎编年史骑士比武怎么玩 09-18
- 洛克王国世界如何搭配高伤阵容 09-18