<html>
<head>
<title>禁止鼠标右键</title>
</head>
<body>
<script language="Javascript">
var mMsg = "你的鼠标右键被禁止了!";

  function disableRightClick(btnClick)
  {
    if (navigator.appName == "Netscape" && btnClick.which == 3)
    {   
      alert(mMsg);
      return false;
    }
    else if (navigator.appName =="Microsoft Internet Explorer" && event.button == 2)  
    {
      alert(mMsg);
      return false;
    }
  }
document.onmousedown = disableRightClick;
</script>
</body>
</html>
