试试我自己做的:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>自定义鼠标右键弹出式菜单</title>
<style type="text/css">
<!--
.p9 {font-size: 12px; line-height: 120%;}
.title {font-size: 25px;}
.div1 { border-top:buttonface 1px solid;border-left:buttonface 1px solid;border-bottom:windowframe 1px solid;border-right:windowframe 1px solid;}
.div2 { border-top:window 1px solid;border-left:window 1px solid;border-bottom:buttonshadow 1px solid;border-right:buttonshadow 1px solid;}
.Mover {background-color:highlight;color:highlighttext;font-size: 12px;cursor:default;font-size: 12px;}
.Mout {background-color:buttonface;color:buttontext;font-size: 12px;cursor:default;font-size: 12px;}
td {font-size: 14.9px;}
select {font-size: 14.9px;}
body {font-size: 14.9px;}
A {text-decoration: none;}
A:hover {color: #FF0000; text-decoration: underline;}
-->
</style>
<script language="javascript">
function PopupMouseRightButtonUpMenu(){
if(MouseMenu.style.visibility=='visible') MouseMenu.style.visibility='hidden';
if(event.srcElement.tagName=='A' || event.srcElement.tagName=='TEXTAREA' || event.srcElement.tagName=='INPUT' || oSelection.type!='None')
return true;
else{
if(event.clientX+150 > document.body.clientWidth)MouseMenu.style.left=event.clientX+document.body.scrollLeft-150;
else MouseMenu.style.left=event.clientX+document.body.scrollLeft;
if(event.clientY+DivH > document.body.clientHeight)MouseMenu.style.top=event.clientY+document.body.scrollTop-DivH;
else MouseMenu.style.top=event.clientY+document.body.scrollTop;
MouseMenu.style.visibility='visible';
}
return false;
}
function DrawMouseRightButtonUpMenu(){
    DivH=2;
oSelection = document.selection;
var HrStr='<tr><td align=\"center\" valign=\"middle\" height=\"2\"><TABLE border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"128\" height=\"2\"><tr><td height=\"1\" bgcolor=\"buttonshadow\"><\/td><\/tr><tr><td height=\"1\" bgcolor=\"buttonhighlight\"><\/td><\/tr><\/TABLE><\/td><\/tr>';
var MenuStr1='<tr><td align=\"center\" valign=\"middle\" height=\"20\"><TABLE border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"132\"><tr><td valign=\"middle\" height=\"16\" class=\"Mout\" onMouseOver=\"this.className=\'Mover\'\" onMouseOut=\"this.className=\'Mout\'\" onclick=\"'
var MenuStr2="<\/td><\/tr><\/TABLE><\/td><\/tr>";
var historyMenu=['window.history.back()\">后退','window.history.forward()\">前进'];
var SysMenu=['\">查找 <INPUT TYPE=\"text\" Size=\"10\" onkeypress=\"if (event.keyCode == 13) {MouseMenu.style.visibility=\'hidden\';var temp = this.value; this.value = \'\';return findInPage(temp)}\";\'>',
'document.execCommand(\'SelectAll\')\">全选',
'MouseMenu.style.visibility=\'hidden\';document.execCommand(\'SaveAs\',\'true\')\">另存为 ...',
'location.replace(\'view-source:\'+location.href)\">查看源文件',
'window.print()\">打印',
'window.location.reload()\">刷新'];
var MenuStr='';
for(i=0;i<historyMenu.length;i++){
MenuStr+=MenuStr1+historyMenu[i]+MenuStr2;
DivH+=20;
}
MenuStr+=HrStr;
for(i=0;i<arguments.length;i++){
MenuStr+=MenuStr1+arguments[i]+MenuStr2;
DivH+=20;
}
if(arguments.length>0){
MenuStr+=HrStr;
DivH+=2;
}
for(i=0;i<SysMenu.length;i++){
MenuStr+=MenuStr1+SysMenu[i]+MenuStr2;
DivH+=20;
}
var DivStr1='<DIV id=\"MouseMenu\" class=\"div1\" style=\"position:absolute; left:0px; top:0px; width=150;height='+DivH+'; z-index:1; visibility:hidden;\"><TABLE border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"div2\"><tr><td bgcolor=\"'+TableColor+'\" width=\"50\" valign=\"bottom\" align=\"center\"  bgcolor=\"buttonface\"><\/td><td bgcolor=\"buttonface\"><TABLE border=\"0\" cellpadding=\"0\" cellspacing=\"0\">';
var DivStr2="<\/TABLE><\/td><\/tr><\/TABLE><\/DIV>";
document.write(DivStr1+MenuStr+DivStr2);
document.body.oncontextmenu=new Function('return PopupMouseRightButtonUpMenu();');
document.body.onclick=new Function('if(event.srcElement.tagName !=\'INPUT\') MouseMenu.style.visibility=\'hidden\'');
document.body.onscroll=new Function('MouseMenu.style.visibility=\'hidden\';');
document.body.onselectstart=new Function('MouseMenu.style.visibility=\'hidden\';');
window.onresizestart=new Function('MouseMenu.style.visibility=\'hidden\';');
}
var NS4 = (document.layers);
var IE4 = (document.all);
var win = window;
var n   = 0;
function findInPage(str) {
  var txt, i, found;
  if (str == "")
    return false;
  if (NS4) {
    if (!win.find(str))
      while(win.find(str, false, true))
        n++;
    else
      n++;
    if (n == 0)
      alert("Not found.");
  }
  if (IE4) {
    txt = win.document.body.createTextRange();
    for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
      txt.moveStart("character", 1);
      txt.moveEnd("textedit");
    }
    if (found) {
      txt.moveStart("character", -1);
      txt.findText(str);
      txt.select();
      txt.scrollIntoView();
      n++;
    }
    else {
      if (n > 0) {
        n = 0;
        findInPage(str);
      }
      else
        alert("文档搜索完毕!");
    }
  }  return false;
}
</script>
</head>
<body>
自定义鼠标右键弹出式菜单
<script language="javascript">
TableColor='#3300FF';
DrawMouseRightButtonUpMenu()
</script>
</body>
</html>