希望有人提供代码.
我把显示的写在一个变量中然后打印出来, 可是出现脚本错误. 谁能帮我..谢谢`~!

解决方案 »

  1.   

    TreeView 不好用吗?去网DOWN一个。
    IEWEBCONTROL。
      

  2.   

    treeview显示效果不是很好, 比如QQ菜单, 不要+ -前面那些图标.
      

  3.   

    继续顶~~! 静态的是没有问题, 但我把它显示页面写到一个变量中然后Response.write()出来就出现脚本错误.
      

  4.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <!-- saved from url=(0054)http://java2000.wol.com.cn/java/js12/menutree/menu.htm -->
    <HTML><HEAD>
    <META content="text/html; charset=gb2312" http-equiv=Content-Type>
    <SCRIPT language=JAVASCRIPT>
    OB_Top=0; //菜单距离顶部的象素值;
    OB_Left=0; //菜单距离左侧的象素值;
    OB_Margin=10;//top and bottom margins between icons and borders
    OB_Width=96;//菜单宽度
    OB_Height=400;//菜单高度
    OB_SlideSpeed=1.5; //菜单运动速度
    OB_BackgroundColor="BACKGROUND";
    //背景色
    OB_ItemsSpacing=25; //2个图标间的距离
    OB_BorderWidth=3; //border宽度
    OB_BorderStyle="ridge"; //border风格
    OB_BorderColor="#dddddd"; //border颜色
    OB_IconsWidth=32; //图标宽度
    OB_IconsHeight=32; //图标高度
    OB_ButtonFontFamily="arial";
    //按钮上字体的字型
    OB_ButtonFontSize=9; //按钮上字体大小 
    OB_ButtonFontColor="black"; //按钮上字体颜色    
    OB_ButtonHeight=25; //按钮的高度
    OB_LabelFontFamily="arial"; //LOGO下字体的字型
    OB_LabelFontSize=9; //LOGO下面的字体大小
    OB_LabelFontColor="white"; //LOGO下的字体颜色
    OB_LabelMargin=3; //margin between labels and icons
    OB_UpArrow="arrowup.gif"; //向上滚动的logo箭头
    OB_DownArrow="arrowdown.gif";
    //向下滚动的logo箭头
    OB_ArrowWidth=15; //箭头的宽度
    OB_ArrowHeight=15; //箭头的高度
    OB_ArrowSlideSpeed=10; //项目列表滚动的速度;
    </SCRIPT><SCRIPT language=JAVASCRIPT>
    if (document.all){
    document.write('<script src="folders.js"><\/script>')
    document.write('<script src="outbar.js"><\/script>')
    }
    </SCRIPT>
    <!--实际应用时由于按下连接打开页面,所以需要你去掉下面的一段js代码,现在用于产生警告框。这一段代码是在folders.js文件中调用的,打开folders.js最前面可以看到注释-->
    <SCRIPT language=JAVASCRIPT>
    function Run(app)
    {
    alert("Application : "+app);
    }
    </SCRIPT><META content="MSHTML 5.00.2920.0" name=GENERATOR></HEAD>
    <BODY></BODY></HTML>
      

  5.   

    folder.js
    /********************************************
    folder name must be OutBarFolder# where # start with 1 and increase by 1
    first element of array is the folder label, next elements are :
    1) url for icon of item
    2) label for item
    3) action link : put 'javascript:MyFunction()' to execute javascript instead of hyperlink
    4) target frame : ignored if you use 'javascript:' in the action link (use 'window' instead of 'parent.main' if you wish the link to load in the CURRENT page
    ********************************************/
    /*你需要修改下面的代码,就是菜单左侧的部分,如果页面在右侧的frame打开,用parent.main,其中main是右侧的frame的名字,见下一句。由于这是例子,所以使用了javascript产生警告框,将它们去掉即可。即将下面的javascript::Run(x)全部替换成具体的页面,并且将紧接着的空的双引号中加上parent.main即可。*/
    OutBarFolder1=new Array(
    "我的好友",
    "mail.gif","Download It","page2.htm","parent.top",
    "chat.gif","Chat","page2.htm","parent.top",
    "news.gif","Newsgroup","page2.htm","parent.top",
    "netm.gif","Netmeeting","page2.htm","parent.top"
    );
    /*你可以替换相应的LOGO,这里全部的LOGO是32-32的,这个尺寸与menu.html文件中定义的一致。*/
    OutBarFolder2=new Array(
    "Folder 2",
    "word.gif","Word","page2.htm","parent.top",
    "excel.gif","Excel","page2.htm","parent.top",
    "ppt.gif","Powerpoint","page2.htm","parent.top",
    "access.gif","Access","page2.htm","parent.top",
    "peditor.gif","Photo Editor","page2.htm","parent.top"
    );
    /*替换上面的javascript:Run(x)为对应的页面,并且在紧接着的双引号中加上打开的frame(parent.main)即可,注意,如果需要整个页面打开,不要使用parent.main,而要用top即可*/
    OutBarFolder3=new Array(
    "Folder 3",
    "word.gif","Word","page2.htm","parent.top",
    "ppt.gif","Powerpoint","page2.htm","parent.top"
    );OutBarFolder4=new Array(
    "Folder 4",
    "mail.gif","E-Mail","page2.htm","parent.top",
    "chat.gif","Chat","page2.htm","parent.top",
    "news.gif","Newsgroup","page2.htm","parent.top",
    "netm.gif","Netmeeting","page2.htm","parent.top",
    "word.gif","Word","page2.htm","parent.top",
    "excel.gif","Excel","page2.htm","parent.top",
    "ppt.gif","Powerpoint","page2.htm","parent.top",
    "access.gif","Access","page2.htm","parent.top",
    "peditor.gif","Photo Editor","page2.htm","parent.top"
    );//例子里有4个菜单按钮,可以增加,但是需要改以下outbar.js中的一些代码,要让程序知道你要处理多少个菜单。内有注释。
      

  6.   

    outbar.js
    document.write("<DIV id='OutlookLikeBar' style='position:absolute;top:"+OB_Top+";left:"+OB_Left+";width:"+OB_Width+";height:"+OB_Height+";border:"+OB_BorderWidth+" "+OB_BorderStyle+" "+OB_BorderColor+";background-color:"+OB_BackgroundColor+";z-index:0;visibility:hidden;clip:rect(0,"+OB_Width+","+OB_Height+",0)'>");
    document.write("<img onMouseUp='OutlookLikeBar.ArrowSelected(this)' onMouseDown='OutlookLikeBar.ArrowClicked(this)' onMouseOver='OutlookLikeBar.OverArrow(this)' onMouseOut='OutlookLikeBar.OutArrow(this)' id='OB_SlideUp' height='"+OB_ArrowHeight+"' width='"+OB_ArrowWidth+"' src='"+OB_UpArrow+"' style='position:absolute;top:0;left:0;cursor:hand;visibility:hidden;z-index:500'>");
    document.write("<img onMouseUp='OutlookLikeBar.ArrowSelected(this)' onMouseDown='OutlookLikeBar.ArrowClicked(this)' onMouseOver='OutlookLikeBar.OverArrow(this)' onMouseOut='OutlookLikeBar.OutArrow(this)' id='OB_SlideDown' height='"+OB_ArrowHeight+"' width='"+OB_ArrowWidth+"' src='"+OB_DownArrow+"' style='position:absolute;top:0;left:0;cursor:hand;visibility:hidden;z-index:500'>");
    j=1;
    while(eval("window.OutBarFolder"+j))
    j++;
    i=j-1;
    while(i>0)
    {
    Folder=eval("OutBarFolder"+i)
    window.status="Outlook-Like Bar is making folder '"+Folder[0]+"'";
    if(i==1)
    {
    document.write("<INPUT position='UP' id='OB_Button1' onDblClick='OutlookLikeBar.FolderClicked("+i+");this.blur()' onClick='OutlookLikeBar.FolderClicked("+i+");this.blur()' TYPE='button' value='"+Folder[0]+"' style='position:absolute;top:0;left:0;width:90;height:"+OB_ButtonHeight+";font-family:"+OB_ButtonFontFamily+";font-size:"+OB_ButtonFontSize+"pt;cursor:hand;color:"+OB_ButtonFontColor+";z-index:100'>");
    MakeItems(Folder,i,OB_ButtonHeight);
    }
    else
    {
    document.write("<INPUT position='DOWN' id='OB_Button"+i+"' onDblClick='OutlookLikeBar.FolderClicked("+i+");this.blur()' onClick='OutlookLikeBar.FolderClicked("+i+");this.blur()' TYPE='button' value='"+Folder[0]+"' style='position:absolute;top:"+(OB_Height-(j-i)*OB_ButtonHeight-OB_BorderWidth*2)+";left:0;width:90;height:"+OB_ButtonHeight+";font-family:"+OB_ButtonFontFamily+";font-size:"+OB_ButtonFontSize+"pt;cursor:hand;color:"+OB_ButtonFontColor+";z-index:100'>");
    MakeItems(Folder,i,(OB_Height-(j-i)*OB_ButtonHeight-OB_BorderWidth*2)+OB_ButtonHeight);
    }
    i--;
    }
    document.write("</DIV>");
    var OutlookLikeBar=new OutBar(OB_Width,OB_Height,j-1,OB_ButtonHeight,OB_BorderWidth,OB_SlideSpeed,OB_IconsHeight+OB_LabelFontSize+OB_LabelMargin+OB_ItemsSpacing,OB_ArrowSlideSpeed);
    window.status="Outlook-Like Bar successful created!";
    document.all["OutlookLikeBar"].style.visibility="visible";/*以下的代码中你需要改动菜单的数目与实际一致,本例用了4个按钮菜单。*/
    function MakeItems(Folder,zorder,top)
    {
    var items=0;
    var folderWidth=(OB_Width-OB_BorderWidth*2);
    while(Folder[items+1])
    items+=4;  //需要改这里及下面的4;
    items/=4;
    document.write("<DIV id='OB_Folder"+zorder+"' style='position:absolute;left:0;top:"+top+";width:"+folderWidth+";height:"+(OB_Margin*2+items*(OB_IconsHeight+OB_LabelFontSize+OB_LabelMargin)+(items-1)*OB_ItemsSpacing)+";z-index:"+zorder+";clip:rect(0 0 0 0);'>");
    for(var i=1;i<items*4;i+=4)
    {
    document.write("<div targetFrame='"+Folder[i+3]+"' link='"+Folder[i+2]+"' onMouseDown='OutlookLikeBar.ItemClicked(this)' onMouseUp='OutlookLikeBar.ItemSelected(this)' onMouseOver='OutlookLikeBar.OverItems(this)' onMouseOut='OutlookLikeBar.OutItems(this)' style='position:absolute;left:"+(Math.ceil((OB_Width-OB_BorderWidth*2-OB_IconsHeight)/2)-1)+";top:"+(OB_Margin+Math.ceil((i-1)/4)*(OB_ItemsSpacing+OB_LabelFontSize+OB_IconsHeight))+";cursor:hand;clip:rect(0 "+OB_IconsWidth+" "+OB_IconsHeight+" 0;width:"+OB_IconsWidth+";height:"+OB_IconsHeight+"'>");
      document.write("<img src='"+Folder[i]+"'>");
    document.write("</div>");
    document.write("<div align='center' style='position:absolute;left:0;top:"+(OB_LabelMargin+OB_IconsHeight+OB_Margin+Math.ceil((i-1)/4)*(OB_ItemsSpacing+OB_LabelFontSize+OB_IconsHeight))+";font-family:"+OB_LabelFontFamily+";font-size:"+OB_LabelFontSize+"pt;color:"+OB_LabelFontColor+"'>");
    document.write(Folder[i+1]);
    document.write("</div>");
    }
    document.write("</DIV>");
    }
    //***************************
    //* Outlook-Like Bar Object *
    //***************************
    function OutBar(width,height,items,buttonHeight,borderWidth,slideSpeed,slideArrowValue,ArrowSlideSpeed)
    {
    this.currentFolder=1;
    this.currentItem=null;
    this.slideCount=0;
    this.slideStep=1;
    this.slideArrowValue=slideArrowValue;
    this.slideSpeed=slideSpeed;
    this.borderWidth=borderWidth;
    this.width=width;
    this.visibleAreaHeight=height-2*borderWidth-items*buttonHeight;
    this.visibleAreaWidth=width;
    this.FolderClicked=FolderClicked;
    this.SlideFolders=SlideFolders;
    this.ItemClicked=ItemClicked;
    this.ItemSelected=ItemSelected;
    this.OverItems=OverItems;
    this.OutItems=OutItems;
    this.OverArrow=OverArrow;
    this.OutArrow=OutArrow;
    this.ArrowClicked=ArrowClicked;
    this.ArrowSelected=ArrowSelected;
    this.ArrowSlideSpeed=ArrowSlideSpeed;
    this.SlideItems=SlideItems;
    this.SlideItemsAction=SlideItemsAction;
    this.Start=Start;
    this.ClipFolder=ClipFolder;
    this.SetArrows=SetArrows;
    this.HideArrows=HideArrows;
    this.sliding=false;
    this.items=items;
    this.started=false;
    this.Start();
    }function FolderClicked(folder)
    {
    if(this.sliding)
    return;
    if(folder==this.currentFolder)
    return;
    this.sliding=true;
    this.slideCount=this.visibleAreaHeight;
    this.slideStep=1;
    this.countStep=0;
    this.HideArrows();
    this.SlideFolders(folder,document.all["OB_Button"+folder].position=="DOWN");
    }function SlideFolders(folder,down)
    {
    var step;
    if(down)
    {
    this.slideCount-=Math.floor(this.slideStep);
    if(this.slideCount<0)
      

  7.   

    谢谢大家的帮助, 问题还是没有解决!
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <style type="text/css">
    .spanstyle {
    COLOR: #00cccc; FONT-FAMILY: 宋体; FONT-SIZE: 10pt; POSITION: absolute; TOP: -50px; VISIBILITY: visible
    }
    </style>
    </head>
    <body>
    <script>
    function showitem(id,name)
    {
    if (id==1){
    return ("<a target=main href='1.htm' class='a1'>"+name+"</a><br>")
    }else if(id==2){
    return ("<a target=main href='2.htm' class='a1'>"+name+"</a><br>")
    }else if(id==3){
    return ("<a target=main href='3.htm' class='a1'>"+name+"</a><br>")
    }else if (id == 4){
    return ("<a target=main href='4.htm' class='a1'>"+name+"</a><br>")
    }else if (id==5){
    return ("<a target=main href='地址' class='a1'>"+name+"</a><br>")
    }else if (id==6){
    return ("<a target=main href='地址' class='a1'>"+name+"</a><br>")
    }else if (id==11){
    return ("<a target=main href='地址' class='a1'>"+name+"</a><br>")
    }else if (id==12){
    return ("<a target=main href='地址' class='a1'>"+name+"</a><br>")
    }else if (id==21){
    return ("<a target=main href='./bbs/index.aspx' class='a1'>"+name+"</a><br>")
    }else if (id==22){
    return ("<a target=main href='地址' class='a1'>"+name+"</a><br>")
    }else if (id==31){
    return ("<a target=main href='WebForm1.aspx' class='a1'>"+name+"</a><br>")
    }else if (id==32){
    return ("<a target=main href='WebForm5.aspx' class='a1'>"+name+"</a><br>")
    }
    }
    function switchoutlookBar(number)
    {
    var i = outlookbar.opentitle;
    outlookbar.opentitle=number;
    var id1,id2,id1b,id2b
    if (number!=i && outlooksmoothstat==0){
    if (number!=-1)
    {
    if (i==-1)
    {
    id2="blankdiv";
    id2b="blankdiv";}
    else{
    id2="outlookdiv"+i;
    id2b="outlookdivin"+i;
    document.all("outlooktitle"+i).style.border="0px none navy";
    //document.all("outlooktitle"+i).style.background="#A5BACE"; //打开过后的显示背景色
    //未激活BAR
    // document.all("outlooktitle"+i).style.color="#738294";
    document.all("outlooktitle"+i).style.textalign="center";
    }
    id1="outlookdiv"+number
    id1b="outlookdivin"+number
    //document.all("outlooktitle"+number).style.border="1px none white";
    //document.all("outlooktitle"+number).style.background="#A5BACE";
    //激活BAR
    //document.all("outlooktitle"+number).style.color="#EFEBEF";
    document.all("outlooktitle"+number).style.textalign="center";
    smoothout(id1,id2,id1b,id2b,0);
    }
    else
    {
    document.all("blankdiv").style.display="";
    document.all("blankdiv").sryle.height="100%";
    document.all("outlookdiv"+i).style.display="none";
    document.all("outlookdiv"+i).style.height="0%";
    document.all("outlooktitle"+i).style.border="0px none navy";
    // document.all("outlooktitle"+i).style.background="YELLOW";
    document.all("outlooktitle"+i).style.color="black";
    document.all("outlooktitle"+i).style.textalign="center";
    }
    }
    }
    function smoothout(id1,id2,id1b,id2b,stat)
    {
    if(stat==0){
    tempinnertext1=document.all(id1b).innerHTML;
    tempinnertext2=document.all(id2b).innerHTML;
    document.all(id1b).innerHTML="";
    document.all(id2b).innerHTML="";
    outlooksmoothstat=1;
    document.all(id1b).style.overflow="hidden";
    document.all(id2b).style.overflow="hidden";
    document.all(id1).style.height="0%";
    document.all(id1).style.display="";
    setTimeout("smoothout('"+id1+"','"+id2+"','"+id1b+"','"+id2b+"',"+outlookbar.inc+")",outlookbar.timedalay);
    }
    else
    {
    stat+=outlookbar.inc;
    if (stat>100)
    stat=100;
    document.all(id1).style.height=stat+"%";
    document.all(id2).style.height=(100-stat)+"%";
    if (stat<100) 
    setTimeout("smoothout('"+id1+"','"+id2+"','"+id1b+"','"+id2b+"',"+stat+")",outlookbar.timedalay);
    else
    {
    document.all(id1b).innerHTML=tempinnertext1;
    document.all(id2b).innerHTML=tempinnertext2;
    outlooksmoothstat=0;
    document.all(id1b).style.overflow="auto";
    document.all(id2).style.display="none";
    }
    }
    }
    function getOutLine()
    {
    outline="<table "+outlookbar.otherclass+" align=center>";
    for (i=0;i<(outlookbar.titlelist.length);i++)
    {
    outline+="<tr><td align=center name=outlooktitle"+i+" id=outlooktitle"+i+" ";
    if (i!=outlookbar.opentitle) 
    outline+=" nowrap align=center bgcolor='c0c0c0' style='cursor:hand;height:18;border:0 none navy' ";
    else
    outline+=" nowrap align=center bgcolor='c0c0c0' style='cursor:hand;background-color:#005D99;color:white;height:18;border:0 none white' ";
    outline+=outlookbar.titlelist[i].otherclass
    outline+=" onclick='switchoutlookBar("+i+")'>";
    outline+=outlookbar.titlelist[i].title+"</td></tr>";
    //显示分论坛内容的表格(down)
    outline+="<tr><td align=center name=outlookdiv"+i+" valign=top align=center  id=outlookdiv"+i+" style='width:126"
    if (i!=outlookbar.opentitle) 
    outline+=";display:none;height:0%;";
    else
    outline+=";display:;height:100%;";
    outline+="'><div name=outlookdivin"+i+" id=outlookdivin"+i+" style='overflow:auto;width:126;height:100%'>";
    for (j=0;j<outlookbar.itemlist[i].length;j++)
    outline+=showitem(outlookbar.itemlist[i][j].key,outlookbar.itemlist[i][j].title);
    outline+="</div></td></tr>"
    }
    //初始状态的表格(d)
    outline+="<tr><td align=center name=blankdiv valign=top align=center  id=blankdiv style='height:100%;width:126:"
    if (outlookbar.opentitle!=-1) 
    outline+=";display:none;";
    else
    outline+=";display:;";
    outline+="'><div style='overflow:auto;width:126;height:100%'>";
    outline+="</div></td></tr>"
    outline+="</table>"
    return outline
    }
    function show()
    {
    var outline;
    outline="<div id=outLookBarDiv name=outLookBarDiv style='width=126;height:100%'>"
    outline+=outlookbar.getOutLine();
    outline+="</div>"
    document.write(outline);
    }
    function theitem(intitle,instate,inkey)
    {
    this.state=instate;
    this.otherclass=" nowrap  align=center";
    this.key=inkey;
    this.title=intitle;
    }
    function addtitle(intitle)
    {
    outlookbar.itemlist[outlookbar.titlelist.length]=new Array();
    outlookbar.titlelist[outlookbar.titlelist.length]=new theitem(intitle,1,0);
    return(outlookbar.titlelist.length-1);
    }
    function additem(intitle,parentid,inkey)
    {
    if (parentid>=0 && parentid<=outlookbar.titlelist.length)
    {
    outlookbar.itemlist[parentid][outlookbar.itemlist[parentid].length]=new theitem(intitle,2,inkey);
    outlookbar.itemlist[parentid][outlookbar.itemlist[parentid].length-1].otherclass=" nowrap align=center style='backgroundColor:blue;height:5' ";
    return(outlookbar.itemlist[parentid].length-1);
    }
    else
    additem=-1;
    }
    function outlook()
    {
    this.titlelist=new Array();
    this.itemlist=new Array();
    this.divstyle="style='height:100%;width:126;overflow:auto' align=center";
    this.otherclass="border=0 cellspacing='0' cellpadding='0' style='height:100%;width:126'valign=middle align=center ";
    this.addtitle=addtitle;
    this.additem=additem;
    this.starttitle=-1;
    this.show=show;
    this.getOutLine=getOutLine;
    this.opentitle=this.starttitle;
    this.reflesh=outreflesh;
    this.timedelay=50;
    this.inc=10;
    }
    function outreflesh()
    {
    document.all("outLookBarDiv").innerHTML=outlookbar.getOutLine();
    }
    function locatefold(foldname)
    {
    for (var i=0;i<outlookbar.titlelist.length;i++)
    if(foldname==outlookbar.titlelist[i].title)
    {
    outlookbar.starttitle=i;
    outlookbar.opentitle=i;
    }
    }
    var outlookbar=new outlook();
    var tempinnertext1,tempinnertext2,outlooksmoothstat
    outlooksmoothstat = 0;
    </script>
      

  8.   

    <script language="javascript"> 
    var t;
    //-----------------------这个地方怎么动态写入, 是不是在这个页面数据库..好像前台不好调用数据库.如果放在后台整个页面做一个后台输出又出错. 希望大家帮帮我. 谢谢! t=outlookbar.addtitle('')
    outlookbar.additem("1",t,"1","main")
    outlookbar.additem("2",t,"2","main")
    outlookbar.additem("3",t,"3","main")
    outlookbar.additem("4",t,"4","main")
    outlookbar.additem("5",t,"5","main")
    outlookbar.additem("6",t,"6","main")
    t=outlookbar.addtitle('菜单2')
    outlookbar.additem("7",t,"11","main")
    outlookbar.additem("8",t,"12","main")
    t=outlookbar.addtitle('交流中心')
    outlookbar.additem("蓝水社区",t,"21","main")
    outlookbar.additem("10",t,"22","main")t=outlookbar.addtitle('系统管理')
    outlookbar.additem("栏目管理",t,"31","main")
    outlookbar.additem("权限管理",t,"32","main")
    //--------------------------------------------------
    </script>
    <table border="0" cellpadding="0" cellspacing="0" width="126" height="100%" align="center">
    <tr>
    <td style="border: 1 solid #000000" id="outLookBarShow" name="outLookBarShow" valign="top"
    align="center" bgcolor="#A5D5CA" width="126" style=""><font color="#ffffff">
    <script>
    outlookbar.show()
    </script>
    </font>
    </td>
    </tr>
    </table>
    </body>
    </html>
      

  9.   

    我也正在找这个QQ式菜单的代码,感谢 atpjxhaq() 提供代码,我去试试!
      

  10.   

    <html>
    <head>
    <title>模拟QQ菜单</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head> 
    <body   bgcolor=#FFFFFF onload="dotransition()"  >
    <script language="JavaScript">
    <!--
    //该函数在调用过程中只需要在将要点击的单元格内的onclick事件中调用showme函数即可
    //function showme(obj1, obj2)该函数主要为使点击的对象高亮度显示,并调用moveme函数,参数obj1为母体即<div>标签的id,obj2为点击对象本身
    //function moveme(obj)该函数判断单元的移动,并调用相应的函数处理,obj参数为母体
    //function moveup(obj,objtop)该函数使一个单元向上移动,参数obj为母体,objtop为母体的本身最高高度
    //function movedown(obj,objbuttom)该函数使一个单元向下移动,参数obj为母体,objbuttom为母体的本身最低高度
    var headHeight = 22;//每个标题的高度
    var bodyHeight = 260;//母体高度
    var objcount = 6;//项目的个数,要改变了项目的个数别忘了该这个东西
    var step = 6;//移动速度(请确认可以被'bodyHeight-headHeight'整除,当前的设定可选速度为1,2,3,6,23,138)
    var moving = false;//是否有移动的项目function showme(obj1, obj2){
     //以下循环为改变标题的背景颜色
    if (moving){
    return;
    }
    moving = true;
    for(i=0;i<document.all.tags("td").length;i++){
    if (document.all.tags("td")[i].className.indexOf('headtd') == 0)
    {
    document.all.tags("td")[i].className = 'headtd1';
    }
    obj2.className = 'headtd2';
    }
    moveme(obj1);
    }function moveme(obj){
    idnumber = parseInt(obj.id.substr(4));
    objtop = headHeight * (idnumber - 1);
    objbuttom = bodyHeight + headHeight * (idnumber - 2);
    currenttop = parseInt(obj.style.top);
    if (currenttop >= objbuttom){
    //检验出每一个应该向上移动的层
    countid = 1;
    for(i=0;i<document.all.tags("div").length;i++){
    if (document.all.tags("div")[i].id == 'item'+countid+'body'){
    obj = document.all.tags("div")[i];
    objtop = headHeight * (countid - 1);
    if (countid == idnumber){
    moveup(obj,objtop,false);
    break;
    }else{
    moveup(obj,objtop,true);
    }
    countid++;
    }
    }
    }else if((currenttop <= objtop) && (idnumber < objcount)){
    //检验出每一个应该向下移动的层
    idnumber++;
    countid = objcount;
    for(i=document.all.tags("div").length-1;i>=0;i--)
    if (document.all.tags("div")[i].id == 'item'+countid+'body'){
    obj = document.all.tags("div")[i];
    objbuttom = bodyHeight + headHeight * (countid - 2);
    if(countid == idnumber){
    movedown(obj,objbuttom,false);
    break;
    }else{
    movedown(obj,objbuttom,true);
    }
    countid--;
    }
    }
    }function moveup(obj,objtop,ismove){
    currenttop = parseInt(obj.style.top);
    if (currenttop > objtop){
    obj.style.top = currenttop - step;
    setTimeout('moveup('+obj.id+','+objtop+','+ismove+')',1)
    return;
    }
    moving = ismove;
    }function movedown(obj,objbuttom,ismove){
    currenttop = parseInt(obj.style.top);
    if(currenttop < objbuttom){
    obj.style.top = currenttop + step;
    setTimeout('movedown('+obj.id+','+objbuttom+','+ismove+')',1)
    return;
    }
    moving = ismove;
    }
    // -->
    </script>
    <style type="text/css">
    <!--
    .headtd1 {  background: #00A4E1; border: 2px outset; border-color: #00BBFF #0077FF #0077FF #00BBFF; cursor: hand; font-size: 9pt}
    .headtd2 {  background: #20C1FF; border: 2px outset; border-color: #60D3FF #0077FF #0077FF #60D3FF; cursor: hand; font-size: 9pt}
    .bodytd  {  background: #99CCFF; border: 2px outset; border-color: #B0D8FF #0077FF #0077FF #B0D8FF; font-size: 9pt}
    -->
    </style>
      

  11.   

    <div id="mainboard" style="position:absolute; left:2px; top:2px; width:90px; height:370px; z-index:3; overflow: hidden; background: #0099FF;" onclick="">
      <div id="item1body" style="position:absolute; left:0; top:0; width:90px; height:260px; z-index:1; overflow: hidden">
        <table width="90" border="0" height="100%" cellpadding="2" cellspacing="0">
          <tr>
            <td id="item1head" height="20" class="headtd2" onclick="showme(item1body,this)">
              <div align="center">★公告栏★</div>
            </td>
        </tr>
        <tr>
            <td class="bodytd">
            <script LANGUAGE="JavaScript">
    <!-- JavaScript ??-
    messages = new Array()
    messages[0] = "首先欢迎各位的大驾光临~~~~!"
    messages[1] = "你是本站的第位访客~!"
    messages[2] = "汉中新视听,本着快、新、优的宗旨册,给你带来最佳的视听享受。"
    messages[3] = "本站是一个集影视 、音乐、FLASH动画、游戏、娱乐、聊天为一体的个人网站。"
    messages[4] = "目前已成为汉中地区最大的个人网站之一。"
    messages[5] = "本站没有商业网站浓厚的广告氛围。没有不堪入目的图片!"
    messages[6] = "最大限度的引领你的感觉 "
    messages[7] = "无须等待,与冰点抗衡,调节温度!"
    messages[8] = "本站将带你进入互联网的神秘地带。"
    messages[9] = "在这里,你我的距离将更近~"
    messages[10] = "浓缩时尚风采,拒揽前沿精彩。"
    messages[11] = "影视 、音乐、FLASH动画、游戏、娱乐、聊天,一切前沿流行资讯尽在这里! "
    messages[12] = "繁杂人世的生活可曾为你增添烦恼?"
    messages[13] = "远离一方嘈杂,来到这片清雅天地"
    messages[14] = "这一刻,请让我们对世界说:请勿打扰!"
    messages[15] = "泡上一杯绿茶,听听悠美的音乐,看看精彩的动画 。"
    messages[16] = "生活就是这么美好!"
    messages[17] = "你还等什么 ?"
    messages[18] = "及刻点击/"
    messages[19] = "将带给你一天的好心情~~~!"
    messages[20] = "最后,非常感谢您的访问。"
    messages[21] = "希望您以后能一如既往的支持本站的发展。谢谢~~~~!"
    mescolor = new Array()
    mescolor[0] = "000000"
    mescolor[1] = "FF0000"
    mescolor[2] = "226622"
    mescolor[3] = "0000FF"
    mescolor[4] = "FFFF00"
    textfont = new Array()
    textfont[0] = "Verdana"
    textfont[1] = "Times"
    textfont[2] = "Arial"
    bagcolor = new Array()
    bagcolor[0] = "CCCCCC"
    bagcolor[1] = "Yellow"
    bagcolor[2] = "CCFFFF"
    bagcolor[3] = "AAEEFF"
    bagcolor[4] = "CCFF88"
    bagcolor[5] = "orange"
    bagcolor[6] = "99AAFF"var i_messages = 0
    var timerfunction randomposition(range){  
    return Math.floor(range*Math.random())
    }function dotransition(){
    if (document.all){
    content.filters[i_messages].apply()
    content.innerHTML = "<table width=90 height=260 border=2><tr><td bgcolor="+bagcolor[randomposition(6)]+" style='color:"+mescolor[randomposition(4)]+";font-family:"+textfont[randomposition(2)]+";font-size:14px' align=center valign=middle>"+messages[i_messages]+"</td></tr></table>"
    content.filters[i_messages].play()
    if (i_messages >= messages.length-1){
    i_messages = 0
            }else{
                i_messages++
            }
        } 
        timer = setTimeout("dotransition()",3000)   
    }
    // - JavaScript ?- -->
    </script>
    <DIV id=content style="position: absolute; top:22px; left:0px; width:90px; height:260px; text-align:center; filter: revealTrans(Transition=1, Duration=3) revealTrans(Transition=2, Duration=3) revealTrans(Transition=3, Duration=2)  revealTrans(Transition=4, Duration=2)  revealTrans(Transition=5, Duration=1)  revealTrans(Transition=6, Duration=3)  revealTrans(Transition=7, Duration=2)  revealTrans(Transition=8, Duration=1)  revealTrans(Transition=9, Duration=3)  revealTrans(Transition=10, Duration=1)  revealTrans(Transition=11, Duration=2)  revealTrans(Transition=12, Duration=3)  revealTrans(Transition=13, Duration=1)  revealTrans(Transition=14, Duration=2)  revealTrans(Transition=15, Duration=3)  revealTrans(Transition=16 Duration=1)  revealTrans(Transition=17, Duration=2)  revealTrans(Transition=18, Duration=3) revealTrans(Transition=19, Duration=1) revealTrans(Transition=20, Duration=2) revealTrans(Transition=21, Duration=3) revealTrans(Transition=22, Duration=3)"> </DIV>
    <DIV id=source style="position: absolute; top22:; left:0; width:90; color: AAAAAA;text-align:center"></DIV>
    <DIV id=nn style="position: absolute; top:22px; left:0x"> </DIV></td>
      </td>
        </tr>
    </table>
      </div>
      <div id="item2body" style="position:absolute; left:0px; top:260; width:90; height:260; z-index:2; overflow: hidden">
        <table width="90" border="0" height="100%" cellpadding="2" cellspacing="0">
          <tr>
            <td id="item2head" height="20" class="headtd1" onclick="showme(item2body,this)">
              <div align="center">●MTV菜单●</div>
            </td>
          </tr>
         <tr>
            <td class="bodytd">
              <div align="center"><a href="#" show_flash >不如跳舞</a></div>
            </td>
          </tr>
    <tr>
      

  12.   

    <td class="bodytd">
              <div align="center"><a href="#">我不是天使</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>眉飞色舞</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>独角戏</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>流星雨</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>大海-张雨生</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>网络情缘</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>忘忧草-周华健</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>西子湖畔</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>他不爱我</a></div>
            </td>
          </tr>
           
    </table>
        <p class="headtd1"> </p>
      </div>
      <div id="item3body" style="position:absolute; left:0; top:282; width:90px; height:260; z-index:3">
        <table width="100%" border="0" height="100%" cellpadding="2" cellspacing="0">
          <tr>
            <td id="item3head" height="20" class="headtd1" onclick="showme(item3body,this)">
              <div align="center">■第11-20首■</div>
            </td>
          </tr>
          <tr>
            <td class="bodytd">
              <div align="center"><a href="#" show_flash >梦醒了</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#">一笑而过</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>真心英雄</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>抱一抱</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>神啊救救我吧</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>没那种命</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>无论如何</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>想你是临睡的习惯</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>重色轻友</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>陌生的夜</a></div>
            </td>
          </tr>
        </table>
      </div>
      <div id="item4body" style="position:absolute; left:0; top:304; width:90px; height:260; z-index:4; overflow: hidden">
        <table width="100%" border="0" height="100%" cellpadding="2" cellspacing="0">
          <tr>
            <td id="item4head" height="20" class="headtd1" onclick="showme(item4body,this)">
              <div align="center">〓第21-30首〓</div>
            </td>
          </tr>
          <tr>
            <td class="bodytd">
              <div align="center"><a href="#" show_flash >爱一个人好难</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#">葬心</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>樱桃小丸子</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>独角戏</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>一千零两夜</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>红楼梦</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>未了情</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>青春舞曲</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>南海姑娘</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>寻找秘籍</a></div>
            </td>
          </tr>
        </table>
      </div>
      <div id="item5body" style="position:absolute; left:0; top:326; width:90px; height:260; z-index:4; overflow: hidden">
        <table width="100%" border="0" height="100%" cellpadding="2" cellspacing="0">
          <tr>
            <td id="item5head" height="20" class="headtd1" onclick="showme(item5body,this)">
              <div align="center">【第31-40首】</div>
            </td>
          </tr>
          <tr>
            <td class="bodytd">
              <div align="center"><a href="http://flash.qbol.net/mtv/images/11194.swf" show_flash >水手</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#">爱无罪</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>三万英尺</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>男人哭吧没有罪</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>我不够爱你</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>忘情水</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>你是我传说</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>缠绵</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>天各一方</a></div>
            </td>
          </tr>
    <tr>
            <td class="bodytd">
              <div align="center"><a href="#" target=show_flash>烦恼星期天</a></div>
            </td>
          </tr>
        </table>
      </div>
      <!--如果要添加一个子项目请拷贝一份下面的代码并放于后面。干什么,不要拷贝我了,是下面的//-->
      <div id="item6body" style="position:absolute; left:0; top:348; width:90px; height:260; z-index:4; overflow: hidden">
        <table width="100%" border="0" height="100%" cellpadding="2" cellspacing="0">
          <tr>
            <td id="item6head" height="20" class="headtd1" onclick="showme(item6body,this)">
              <div align="center">〖第41-50首〗</div>
            </td>
          </tr>
          <tr>
            <td class="bodytd">
    </div>
    </body>
    </html>
      

  13.   

    luqd(秋雨孤灯)的测试可以通过,就是速度慢了点
      

  14.   

    Sorry,速度可以改的,改了后比如改为:23,或者138后部分被覆盖了