屏蔽右键代码:
<html>
<head>
<script>
function click(e) {
 if (document.all) { //ie
  if (event.button==1||event.button==2||event.button==3) {
   oncontextmenu='return false';
  }
 }
 if (document.layers) { //ff
  if (e.which == 3) {
   oncontextmenu='return false';
  }
 }
}
if (document.layers) {//other
 document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
</script>
</head>
<body>
//测试文本
</body>
</html>
网上搜索的