树不用讲了,自己去找一棵,右键菜单建议用PopUp方式处理。
关于右键菜单可以参考:
http://blog.csdn.net/dh20156/archive/2006/07/09/896118.aspx右键事件oncontextmenu

解决方案 »

  1.   

    把代码粘下去看看就明白了<HEAD>
    <style>
    <!--
    .skin0 {
    position:absolute;
    text-align:left;
    width:200px;
    border:2px solid black;
    background-color:menu;
    font-family:Verdana;
    line-height:20px;
    cursor:default;
    visibility:hidden;
    }
    .skin1 {
    cursor:default;
    font:menutext;
    position:absolute;
    text-align:left;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10pt;
    width:120px;
    background-color:menu;
    border:1 solid buttonface;
    visibility:hidden;
    border:2 outset buttonhighlight;
    }
    .menuitems {
    padding-left:15px;
    padding-right:10px;
    }
    -->
    </style><SCRIPT LANGUAGE="javascript">
    <!-- Begin
    var menuskin = "skin1"; // skin0, or skin1
    var display_url = 0; 
    function showmenuie5() {
    var rightedge = document.body.clientWidth-event.clientX;
    var bottomedge = document.body.clientHeight-event.clientY;
    if (rightedge < ie5menu.offsetWidth)
    ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
    else
    ie5menu.style.left = document.body.scrollLeft + event.clientX;
    if (bottomedge < ie5menu.offsetHeight)
    ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
    else
    ie5menu.style.top = document.body.scrollTop + event.clientY;
    ie5menu.style.visibility = "visible";
    return false;
    }
    function hidemenuie5() {
    ie5menu.style.visibility = "hidden";
    }
    function highlightie5() {
    if (event.srcElement.className == "menuitems") {
    event.srcElement.style.backgroundColor = "highlight";
    event.srcElement.style.color = "white";
    if (display_url)
    window.status = event.srcElement.url;
    }
    }
    function lowlightie5() {
    if (event.srcElement.className == "menuitems") {
    event.srcElement.style.backgroundColor = "";
    event.srcElement.style.color = "black";
    window.status = "";
    }
    }
    function jumptoie5() {
    if (event.srcElement.className == "menuitems") {
    if (event.srcElement.getAttribute("target") != null)
    window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
    else
    window.location = event.srcElement.url;
    }
    }
    // End -->
    </script>
    </HEAD><BODY oncontextmenu="showmenuie5()"><div id="ie5menu" class="skin0" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5();">
    <div class="menuitems" url="java script:history.back();">Go Back</div>
    <div class="menuitems" url="http://gocom.primeton.com/">Go Home</div>
    <hr>
    <div class="menuitems" url="http://gocom.primeton.com/modules/newbb/index.php">goCom Forum</div>
    <div class="menuitems" url="http://gocom.primeton.com/modules/xoopsBlog/">goCom Blog</div>
    <hr>
    <div class="menuitems" url="http://blog.csdn.net/kaukiyou">Link to MyBlog</div>
    <div class="menuitems" url="http://blog.csdn.net/kaukiyou/contact.aspx">Contact Me</div>
    </div>
    <script language="javascript">
    if (document.all && window.print) {
    ie5menu.className = menuskin;
    document.oncontextmenu = showmenuie5;
    document.body.onclick = hidemenuie5;
    }
    </script>
    </BODY>
      

  2.   

    把这个事件加到你的结点上就可以了 oncontextmenu="showmenuie5()"