产品使用及交流论坛

首页 » 产品使用交流区 » 安装及使用交流 » 如果想整个前台禁用右键 应该改哪个文件
bamboo212 - 2009/8/16 15:08:00
TR
谢谢
apple - 2009/8/16 15:53:00
(把下列代码放到网站底部信息中(切换源代码模式))
<script language="JavaScript">
<!--

if (window.Event)
document.captureEvents(Event.MOUSEUP);

function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;

return false;
}

function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}

}
document.onmousedown = norightclick; // for all others
//-->
</script>
uu1 - 2009/8/16 23:20:00

如何禁止 某一个页面 禁止鼠标右键    (
applevx - 2010/11/9 9:44:00
原帖由 apple 于 2009-8-16 15:53:00 发表
(把下列代码放到网站底部信息中(切换源代码模式))
<script language="JavaScript">
<!--

if (window.Event)
document.captureEvents(Event.MOUSEUP);

function nocontextmenu() ......


我试了一下,不过没有作用呀!?
1
查看完整版本: 如果想整个前台禁用右键 应该改哪个文件