安大互联
财经热点 > Asp编程 > 鼠标右键绝对禁止法
【问题文章】鼠标右键绝对禁止法
浏览次数:【293】  发布日期:2009-8-13 12:09:22    文章分类:Asp编程   
专题:问题文章】 【
 
softet

<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.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
//-->
</script>


手机扫码浏览该文章
 ● 相关资讯推荐
 ● 相关资讯专题
  • 网络建设业务咨询

   TEl:13626712526