<div class="codetitle"> <span><a style="CURSOR: pointer" data="28724" class="copybut" id="copybut28724" onclick="doCopy('code28724')"><u>复制代</u></a></span> 代码如下:</div> <div class="codebody" id="code28724"> <br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <BR><html xmlns="http://www.w3.org/1999/xhtml"> <br> <br><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <br><title>イーミン</title> <br><script type="text/javascript"> <br>function NoRightClick(pid){ <br>//pid:flash の親ノード ID <br>var el = document.getElementById(pid); <br>if(el.addEventListener){ <br>el.addEventListener("mousedown",function(event){ <br>if(event.button == 2){ <br>event.stopPropagation(); // Firefox の場合 <br>event.preventDefault(); //Chrome の場合 <br>} <br>},true); <br>}else{ <br>el.attachEvent("onmousedown",function(){ <br>if(event.button == 2){ <br>el.setCapture(); <br>} <br> }); <br>el.attachEvent("onmouseup",function(){ <br>el.releaseCapture(); <br>}); <br>el.oncontextmenu = function(){ <br>return false; <br>}; <br>} <br>}; <br></script> <br></head> <br> <br><div id="testContent" style="width:800px"> <br><embed id="t1" height="780px" width="750" pluginspage="http://www.adobe.com/go/getflashplayer" wmode="opaque" menu="false" allowedscriptaccess= "sameDomain" algin="middle" name="t1"quality="high" bgcolor="#000000" src="test.swf" type="application/x-shockwave-flash"/> <br> </div> <br><script type="text/javascript"> <br>var so = new SWFObject("test.swf", "t1", "800", "550", "9", "#000000"); <br>so.addParam("品質", "高"); <br>so.addParam("名前", "t1"); <br>so.addParam("id", "t1"); <br>so.addParam("algin", "middle"); <br>so.addParam("AllowScriptAccess", "sameDomain"); <br>so.addParam("メニュー", "false"); <br>so.addParam("wmode", "opaque"); <br>so.addParam("pluginspage", "http://www.adobe.com/go/getflashplayer"); <br>so.write("testContent"); <br>NoRightClick("testContent"); <br></script> <br></body> <br></html> <br> <br> テストを行うと、このコードは IE、Firefox、Google Chrome で Flash の右側のメニューから削除されるため便利です。