http://fason.nease.net/zhuanti/menu.htm

解决方案 »

  1.   

    http://www.i-see.net/bindows/bindows/samples/applauncher/
      

  2.   

    http://www.i-see.net/bindows/bindows/html/bimain.html?Adf=http%3A%2F%2Fwww.i-see.net%2Fbindows%2Fbindows%2Fsamples%2Fapplauncher%2F..%2F..%2Ftest%2FMenuTest2.xml;AdfName=MenuTest2;Params=0
      

  3.   

    <HTML>
    <HEAD><TITLE>树形菜单</TITLE>
    <STYLE type=text/css></STYLE>
    <STYLE>
    #ssm2 A {
    FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana; TEXT-DECORATION: none}
    #ssm2 A:hover {
    COLOR: red}
    </STYLE><SCRIPT language=JavaScript1.2>
    function MM_displayStatusMsg(msgStr) {   status=msgStr;  document.MM_returnValue = true;}
    function highlight(x){document.forms[x].elements[0].focus()document.forms[x].elements[0].select()}
    function MM_jumpMenu(targ,selObj,restore){   eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");  if (restore) selObj.selectedIndex=0;}
    var NSIE=document.all;NS=document.layers;hdrFontFamily="Verdana";hdrFontSize="2";hdrFontColor="white";hdrBGColor="#666666";linkFontFamily="Verdana";linkFontSize="2";linkBGColor="white";linkOverBGColor="#CCCCCC";linkTarget="_top";YOffset=60;staticYOffset=20;menuBGColor="black";menuIsStatic="no";menuHeader="Main Index"menuWidth=150; // Must be a multiple of 5!staticMode="advanced"barBGColor="#1298fd";barFontFamily="Verdana";barFontSize="2";barFontColor="white";barText="MENU";
    function moveOut() {if (window.cancel) {  cancel="";}if (window.moving2) {  clearTimeout(moving2);  moving2="";}if ((IE && ssm2.style.pixelLeft<0)||(NS && document.ssm2.left<0)) {  if (IE) {ssm2.style.pixelLeft += (5%menuWidth);}if (NS) {  document.ssm2.left += (5%menuWidth);}moving1 = setTimeout('moveOut()', 5)}else {  clearTimeout(moving1)  }};
    function moveBack() {  cancel = moveBack1()}function moveBack1() {  if (window.moving1) {    clearTimeout(moving1)}if ((IE && ssm2.style.pixelLeft>(-menuWidth))||(NS && document.ssm2.left>(-150))) {  if (IE) {ssm2.style.pixelLeft -= (5%menuWidth);}if (NS) {  document.ssm2.left -= (5%menuWidth);}moving2 = setTimeout('moveBack1()', 5)}  else {    clearTimeout(moving2)  }};lastY = 0;function makeStatic(mode) {if (IE) {winY = document.body.scrollTop;var NM=ssm2.style}if (NS) {winY = window.pageYOffset;var NM=document.ssm2}if (mode=="smooth") {  if ((IE||NS) && winY!=lastY) {    smooth = .2 * (winY - lastY);      if(smooth > 0) smooth = Math.ceil(smooth);    else smooth = Math.floor(smooth);      if (IE) NM.pixelTop+=smooth;        if (NS) NM.top+=smooth;      lastY = lastY+smooth;}setTimeout('makeStatic("smooth")', 1)}else if (mode=="advanced") {  if ((IE||NS) && winY>YOffset-staticYOffset) {    if (IE) {NM.pixelTop=winY+staticYOffset  }if (NS) {NM.top=winY+staticYOffset  }}else {if (IE) {NM.pixelTop=YOffset} if (NS) {NM.top=YOffset-7 }}setTimeout('makeStatic("advanced")', 1) }}
    function init() {if (IE) {ssm2.style.pixelLeft = -menuWidth;ssm2.style.visibility = "visible"}else if (NS) {document.ssm2.left = -menuWidth;document.ssm2.visibility = "show"}else {alert('Choose either the "smooth" or "advanced" static modes!')}}function MM_displayStatusMsg(msgStr) {   status=msgStr;  document.MM_returnValue = true;}</SCRIPT><SCRIPT language=JavaScript1.2>if (IE) {document.write('<DIV ID="ssm2" style="visibility:hidden;Position : Absolute ;Left : 0px ;Top : '+YOffset+'px ;Z-Index : 20;width:1px" onmouseover="moveOut()" onmouseout="moveBack()">')}if (NS) {document.write('<LAYER visibility="hide" top="'+YOffset+'" name="ssm2" bgcolor="'+menuBGColor+'" left="0" onmouseover="moveOut()" onmouseout="moveBack()">')}tempBar=""for (i=0;i<barText.length;i++) {tempBar+=barText.substring(i, i+1)+"<BR>"}document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+(menuWidth+16+2)+'" bgcolor="'+menuBGColor+'"><tr><td bgcolor="'+hdrBGColor+'" WIDTH="'+menuWidth+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+menuHeader+'</b></font></td><td align="center" rowspan="100" width="16" bgcolor="'+barBGColor+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD></tr>')function addItem(text, link, target) {if (!target) {target=linkTarget}document.write('<TR><TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+link+'" target="'+target+'" CLASS="ssm2Items">'+text+'</A></FONT></LAYER></ILAYER></TD></TR>')}function addHdr(text) {document.write('<tr><td bgcolor="'+hdrBGColor+'" WIDTH="140"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+text+'</b></font></td></tr>')}//Only edit the script between HEREaddItem('Dynamic Drive', '../../../www.dynamicdrive.com/default.htm', '');addItem('What\'s New', 'http://www.dynamicdrive.com/new.htm', '');addItem('What\'s Hot', 'http://www.dynamicdrive.com/hot.htm', '');addItem('Forum', '../../../wsabstract.com/cgi-bin/ultimate.cgi', '');addItem('FAQs', '../../../www.dynamicdrive.com/faqs.htm', '');addItem('Submit', '../../../www.dynamicdrive.com/submitscript.htm', '');addHdr('External Links');addItem('Website Abstraction', '../../../wsabstract.com/default.htm', '_blank');addItem('Freewarejava', '../../../freewarejava.com/default.htm', '_blank');addItem('DHTML Zone', '../../../www.dhtml-zone.com/default.htm', '_blank');addItem('active-x.com', '../../../www.active-x.com/default.htm', '_blank');addItem('Web Review', '../../../www.webreview.com/default.htm', '_blank');addItem('David\'s Website', 'http://www.david-thurston.co.uk', '_blank');// and HERE! No more!document.write('<tr><td bgcolor="'+hdrBGColor+'"><font size="0" face="Arial"> </font></td></TR></table>')if (IE) {document.write('</DIV>')}if (NS) {document.write('</LAYER>')}if ((IE||NS) && (menuIsStatic=="yes"&&staticMode)) {makeStatic(staticMode);}</SCRIPT><SCRIPT>window.onload=init</SCRIPT>
    <META content="MSHTML 6.00.2800.1264" name=GENERATOR></HEAD>
    <BODY bgColor=#ffffff leftMargin=0 topMargin=0>
    </BODY></HTML>
      

  4.   

    本人之作.<script>
    //--Date:2002-12-30  Author: Benjamin Tanvar list2=new Array(); 
    list2[1]=new Array('<center><b>Commitment</b></center>', null , null );
    list2[2]=new Array('<b>List by Date</b>' , '/vegasSys/VegasFun/Comm/viewComm.aspx', '_parent');
    list2[3]=new Array('<b>Add Commitment</b>' , 'javascript:addComm()', '_parent');
    list2[4]=new Array('<b>Search Commitment</b>' , '/vegasSys/VegasFun/Comm/searchComm.aspx' , '_parent');
     
    list2[5]=new Array('<center><b>Quota</b></center>' , null , null );
    list2[6]=new Array('<b>View Quota by Category </b>' , '/vegasSys/VegasFun/quo/viewquota_b.aspx', '_parent');
    list2[7]=new Array('<b>On Hand Quota Balance</b>' , '/vegasSys/VegasFun/quo/viewQCBalance.aspx', '_parent');
    list2[8]=new Array('<b>Annual Quota Summary</b>' , '/vegasSys/VegasFun/quo/viewQuotaSummary.aspx', '_parent');
     list2[9]=new Array('<center><b>M.O.</b></center>' , null , null );
    list2[10]=new Array('<b>List by M.O. Number</b>' , '/vegasSys/VegasFun/mo/viewMO.aspx', '_parent');
    list2[11]=new Array('<b>Search M.O.</b>' , '/vegasSys/VegasFun/mo/searchMo.aspx', '_parent'); list2[12]=new Array('<center><b>System</b></center>' , null , null );
     list2[13]=new Array('<b>User Management</b>' , '/vegasSys/vegasFun/user/manageUser.aspx' , '_parent' );
    list2[14]=new Array('<b>Optional Category</b>' , '/vegasSys/vegasFun/user/opCate.aspx' , '_parent' );
    list2[15]=new Array('<b>Manage Category NO</b>' , '/vegasSys/vegasFun/user/viewCateNO.aspx' , '_parent' );
    list2[13]=new Array(0,0,0);
    list2[14]=new Array(0,0,0);
    list2[15]=new Array(0,0,0);
    list2[16]=new Array('<b>Logout</b>' , 'javascript:mySignout()' , '_parent' );
    var list=new Array()
    var j=1for(i=1;i<list2.length;i++){   if(list2[i][0]!=0){
           list[j]=list2[i]
           j++
           }   
    }function mySignout()
    {
    var aa;
    aa=confirm('Are you sure to exit this system?')
    if (aa == "1" )
    {
       top.location = "/VegasSys/SignOut.aspx"
    }else
    {
    return "<script>javascript:history.back(1)<"+"/script>";
    }
    }
    //========
    function addComm()
    {
    var aa;
    aa = confirm('Add commiment ?')
    if (aa == "1" )
    {
    parent.document.location = "/vegasSys/VegasFun/Comm/addComm.aspx";
    }else
    {
    return "<script>javascript:history.back(1)<"+"/script>";
    }
    }
    //=========
    function addMO()
    {
    var aa;
    aa = confirm('Add MO ?')
    if (aa == "1" )
    {
    parent.document.location = "/vegasSys/VegasFun/mo/addMo.aspx";
    }else
    {
    return "<script>javascript:history.back(1)<"+"/script>";
    }
    }// VARIOUS SETTINGS/COLORS/TEXT STYLES
    var linktextcolor="black"; // FONT COLOR OF THE LINKS
    var linktexthovercolor="teal"; // HOVER COLOR OF LINKS
    var linktextsize=2; // FONT SIZE OF THE LINKS (1 TO 6)
    var linktextface="sans-serif"; // FONT FACE OF THE LINKS
    var linkbgcolor="lightgrey"; // BACKGROUND COLOR OF THE LINK BARS
    var linkhoverbgcolor="darkgray"; // BACKGROUND COLOR OF THE LINK BARS AS USER HOVERS OVER THEM
    var cellheight=25; // HEIGHT OF LINK BARS IN PIXELS (MIN=20).var bartextcolor="black"; // FONT COLOR OF THE "MENU" BAR AND ANY TITLEBARS
    var bartextsize=2; // FONT SIZE OF THE MENU/TITLE BARS
    var bartextface="sans-serif"; // FONT FACE OF THE MENU/TITLE BARS
    var barbgcolor="white"; // BACKGROUND COLOR OF THE MENU/TITLE BARSvar bordercolor="black"; // BORDER COLOR SURROUNDING ALL BARSvar barwidth=22; // WIDTH OF THE "MENU" BAR (SET WIDE ENOUGH SO LINKTEXT DOESN'T WRAP)
    var follow=true; // true=MENU FOLLOWS PAGE SCROLL, false=MENU IS STATIONARY
    var menuwidth=190; // WIDTH OF TEXT LINK BARS
    var yoffset=10; // OFFSET FROM TOP OF THE PAGE
    //*********DO NOT EDIT BEYOND THIS POINT**********//
    var smenu, pagedone=false, id, loff=1;
    linktextsize=Math.max(Math.min(linktextsize,6),1);
    if(linktextsize>6)linktextsize=6; if(linktextsize<1)linktextsize=1;
    if((linktextsize*5+10)>cellheight)cellheight=Math.max(20,(linktextsize*5+10));
    var btbl='<table cellpadding="0" cellspacing="0" border="0" width="'+menuwidth+'"><tr><td valign="center" width="'+menuwidth+'" height="'+cellheight+'" ';
    var NS4=(navigator.appName.indexOf("Netscape")>=0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5)? true : false;
    var IE4=(document.all)? true : false;
    var NS6=(parseFloat(navigator.appVersion) >= 5 && navigator.appName.indexOf("Netscape")>=0 )? true: false;var txt='<table cellpadding="0" cellspacing="1" border="0" bgcolor="'+bordercolor+'" width="'+(menuwidth+barwidth+3)+'">';
    for(i=1;i<list.length;i++){
    if(list[i][1]!=null){
    txt+='<tr><td width="'+menuwidth+'" height="'+cellheight+'">';
    txt+='<div style="position:relative; width:'+menuwidth+'px; height:'+cellheight+'px;">';
    txt+='<div id="h'+i+'" style="position:absolute; top:0px; left:0px; width:'+menuwidth+'px; height:'+cellheight+'px; background-color:'+linkhoverbgcolor+';">'+btbl+' bgcolor="'+linkhoverbgcolor+'"><font color="'+linktexthovercolor+'" size="'+linktextsize+'" face="'+linktextface+'">&nbsp;'+list[i][0]+'</font></td></tr></table></div>';
    txt+='<div id="n'+i+'" style="position:absolute; top:0px; left:0px; width:'+menuwidth+'px; height:'+cellheight+'px; background-color:'+linkbgcolor+';">'+btbl+' bgcolor="'+linkbgcolor+'"><font color="'+linktextcolor+'" size="'+linktextsize+'" face="'+linktextface+'">&nbsp;'+list[i][0]+'</font></td></tr></table></div>';
    txt+='<div style="position:absolute; top:0px; left:0px; width:'+menuwidth+'px; height:'+cellheight+'px;" onmouseover="parent.hoverlayer(\'h\',\'n\','+i+')" onmouseout="parent.hoverlayer(\'n\',\'h\','+i+')">'+btbl+'>';
    txt+='<a href="'+list[i][1]+'" target="'+list[i][2]+'"><img src="../../images/blank.gif" width="'+menuwidth+'" height="'+cellheight+'" border="0"></a>';
    txt+='</td></tr></table></div></div></td>';
    }else{
    txt+='<tr height="'+cellheight+'"><td width="'+menuwidth+'" bgcolor="'+barbgcolor+'" height="'+cellheight+'" valign="center"><font color="'+bartextcolor+'" size="'+linktextsize+'" face="'+linktextface+'">'+list[i][0]+'</font></td>';
    loff+=1;
    }
    if(i==1)txt+='<td rowspan="'+(list.length-1)+'" bgcolor="'+barbgcolor+'" width="'+barwidth+'" height="'+cellheight+'" align="center"><font color="'+bartextcolor+'" size="'+bartextsize+'" face="'+bartextface+'"><b>M<br>E<br>N<br>U</b></font></td>';
    txt+='</tr>';
    }
    txt+='</table>';
      

  5.   


    var txtout='<div id="smenu" style="width:'+(menuwidth+barwidth+3)+'; position:absolute; left:0px; top:0px; background-color:'+bordercolor+'; visibility:hidden">';
    txtout += txt;
    txtout += '</div>';
    document.write( txtout );
    function hoverlayer(h,n,num){if(IE4){
    window.frames['myMoveMenu'].document.all[h+num].style.visibility="visible";
    window.frames['myMoveMenu'].document.all[n+num].style.visibility="hidden";
    }
    }function init(){
    var frmBody = "";
    frmBody += "<body  onkeydown='if(event.keyCode==78&amp;&amp;event.ctrlKey)return false;'  oncontextmenu='return false'   onselectstart='return false' leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>";
    frmBody += txt;
    frmBody += "</" + "body>";//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    smenu=document.all.smenu;window.frames['myMoveMenu'].document.write(frmBody);
    window.frames['myMoveMenu'].document.close();document.all.myMoveMenu.style.width = menuwidth + barwidth + 3;
    document.all.myMoveMenu.style.height = smenu.offsetHeight;
    movexto(-menuwidth-2);
    smenu.style.visibility="visible";pagedone=true;
    setInterval('movemenu()', 75);
    }
    function movemenu(){
    if(follow){
    var y=parseInt(smenu.style.top);
    var sy=document.body.scrollTop;
    moveyto(((sy-y+yoffset)/3+3)+y);
    }
    }function showmenu(toshow){
    if(pagedone){
    if(toshow){
    clearTimeout(id);
    movexto(-1);
    }else id=setTimeout('movexto(-menuwidth-2)',200);
    }
    }function movexto(x){
    smenu.style.left=x+'px';
    document.all.myMoveMenu.style.left = x+'px';
    }
    function moveyto(y){
    smenu.style.top=y+'px';
    document.all.myMoveMenu.style.top = y+'px';
    }
    window.onload=init;
    </script>
    <script language="vb" src="msgbox.vbs" type="text/vbscript"></script>
    <IFRAME onmouseover="showmenu(true)" onmouseout="showmenu(false)" id="myMoveMenu" border="0" frameBorder="0" scrolling="no" style="position:absolute; border:0;width:0;height:0"></IFRAME>