首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

障蔽右键+自定义

2012-11-22 
屏蔽右键+自定义下载GoogleCode里的RightClickManager包,修改index.template.htmlscript typetext/java

屏蔽右键+自定义
下载GoogleCode里的RightClickManager包,修改index.template.html

<script type="text/javascript">            // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection.             var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";            // To use express install, set to playerProductInstall.swf, otherwise the empty string.             var xiSwfUrlStr = "${expressInstallSwf}";            var flashvars = {};            var params = {};            params.quality = "high";            params.bgcolor = "${bgcolor}";            params.allowscriptaccess = "sameDomain";            params.allowfullscreen = "true";            params.wmode = "opaque";//增加即可            var attributes = {};            attributes.id = "${application}";            attributes.name = "${application}";            attributes.align = "middle";            swfobject.embedSWF(                "${swf}.swf", "flashContent",                 "${width}", "${height}",                 swfVersionStr, xiSwfUrlStr,                 flashvars, params, attributes);            // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.            swfobject.createCSS("#flashContent", "display:block;text-align:left;");        </script>


在程序初始化的时候调用一下RightClickManager.regist()即可实现屏蔽,右键的菜单可以通过添加右键事件.addEventListener(RightClickManager.RIGHT_CLICK,rightClickHandle);进行实现了。

热点排行