最新下载
热门教程
- 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
相关文章
- 耐玩的双人游戏无广告推荐 2026免费的双人游戏无广告盘点 07-15
- 适合小学生玩的游戏推荐 2026小学生喜欢玩的游戏合集 07-15
- 日式rpg游戏合集 2026最受欢迎的日式rpg游戏大盘点 07-15
- 濡沫江湖洛阳郊外隐藏宝箱具体位置一览 07-15
- 暗黑破坏神4怎么堆叠减伤 暗黑破坏神4堆减伤攻略 07-15
- tavo角色卡怎么导入 07-15