第一段
<script language="JavaScript">
var currTimerlinePoint = 0;
var totalTimerlineFrames = 2;
var timerlineTimer;
var leftLine = 50;
var timerIn;
var timerOut;
var timerlineArray = new Array();
timerlineArray[0]='';
timerlineArray[1]='menuItemOut()';function runTimerline()
{
//if (totalTimerlineFrames > currTimerlinePoint)
//  {
//  eval( timerlineArray[currTimerlinePoint]);
//  currTimerlinePoint ++;
//  }
//else {currTimerlinePoint = 0; clearTimeout(window.timerlineTimer); return false;}//window.timerlineTimer = setTimeout('runTimerline()',1000);window.timerlineTimer = setTimeout('menuItemOut()',500);}function stopTimerline()
{
clearTimeout(window.timerlineTimer);
//currTimerlinePoint = 0;
}
 
function menuItemIn()
{
    if( leftLine != 150)
     {
 item11.style.pixelLeft += 20; item11.filters.alpha.opacity += 20; 
     item12.style.pixelLeft -= 20; item12.filters.alpha.opacity += 20; 
     item13.style.pixelLeft += 20; item13.filters.alpha.opacity += 20; 
     item14.style.pixelLeft -= 20; item14.filters.alpha.opacity += 20;
     item15.style.pixelLeft += 20; item15.filters.alpha.opacity += 20;
     item16.style.pixelLeft -= 20; item16.filters.alpha.opacity += 20;
     item17.style.pixelLeft += 20; item17.filters.alpha.opacity += 20;
     item18.style.pixelLeft -= 20; item18.filters.alpha.opacity += 20;
     item19.style.pixelLeft += 20; item19.filters.alpha.opacity += 20;
     item20.style.pixelLeft -= 20; item20.filters.alpha.opacity += 20;
     leftLine += 20;
 }
  else 
     {
 clearTimeout(window.timerIn);
     return false;
 }
  timerIn=window.setTimeout('menuItemIn()',1);
}function menuItemOut()

   clearTimeout(window.timerIn);
  if (leftLine != 50)
     {
      item11.style.pixelLeft -= 20; item11.filters.alpha.opacity -= 20;
      item12.style.pixelLeft += 20; item12.filters.alpha.opacity -= 20;
      item13.style.pixelLeft -= 20; item13.filters.alpha.opacity -= 20;
      item14.style.pixelLeft += 20; item14.filters.alpha.opacity -= 20;
      item15.style.pixelLeft -= 20; item15.filters.alpha.opacity -= 20;
      item16.style.pixelLeft += 20; item16.filters.alpha.opacity -= 20;
      item17.style.pixelLeft -= 20; item17.filters.alpha.opacity -= 20;
      item18.style.pixelLeft += 20; item18.filters.alpha.opacity -= 20;
      item19.style.pixelLeft -= 20; item19.filters.alpha.opacity -= 20;
      item20.style.pixelLeft += 20; item20.filters.alpha.opacity -= 20;
      leftLine -= 20;
  }
   else 
     {
 clearTimeout(window.timerOut);
     return false;
     }
  timerOut=window.setTimeout("menuItemOut()",1);
}
</script>
</head><body bgcolor="#FFFFFF" text="#000000"><div style="position:absolute; left:0px; top:-30px"><div align=center id="menu01" style="position:absolute; left:150px; top:33px; width:100px; height:19px; z-index:1; background-color: #000099; layer-background-color: #000099; border: 1px none #000000;padding-top:3;cursor:hand;font-size:9pt" onmouseover='stopTimerline();menuItemIn()' onmouseout='runTimerline()'><font color=white>主菜单</div> 
<div align=center id="item11" style="position:absolute; left:50px; top:55px; width:99px; height:19px; z-index:2; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:4;cursor:hand;font-size:9pt" 
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()" 
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项一</div>
<div align=center id="item12" style="position:absolute; left:250px; top:77px; width:99px; height:19px; z-index:3; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()" 
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项二</div>
<div align=center id="item13" style="position:absolute; left:50px; top:99px; width:99px; height:19px; z-index:4; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()" 
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项三</div>
<div align=center id="item14" style="position:absolute; left:250px; top:121px; width:99px; height:19px; z-index:5; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()" 
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项四</div>
<div align=center id="item15" style="position:absolute; left:50px; top:143px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()" 
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项五</div>
<div align=center id="item16" style="position:absolute; left:250px; top:165px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()" 
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项六</div>
<div align=center id="item17" style="position:absolute; left:50px; top:187px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()" 
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项七</div>
<div align=center id="item18" style="position:absolute; left:250px; top:209px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()" 
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项八</div>
<div align=center id="item19" style="position:absolute; left:50px; top:231px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()" 
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项九</div>
<div align=center id="item20" style="position:absolute; left:250px; top:253px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()" 
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项十</div></div>
</body>

解决方案 »

  1.   

    第二段
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <!-- saved from url=(0056)http://darkvn.top263.net/myscript/movemenu/movemenu2.htm -->
    <HTML><HEAD><TITLE>moveMenu</TITLE>
    <META content="text/html; charset=gb2312" http-equiv=Content-Type>
    <STYLE type=text/css>.alpha {
    FILTER: Alpha(Opacity=80)
    }
    .td1 {
    FONT-SIZE: 12px
    }
    .td2 {
    BACKGROUND-COLOR: #ccffff; CURSOR: hand; FONT-SIZE: 12px
    }
    .maskl {
    OVERFLOW: hidden
    }
    .cardtitle {
    BORDER-BOTTOM: black 0px solid; BORDER-LEFT: black 0px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; CURSOR: default; FONT-SIZE: 12px; TEXT-INDENT: 4pt
    }
    .cardbottom {
    BACKGROUND-COLOR: #99ccff; BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 0px solid; FILTER: Alpha(Opacity=90)
    }
    </STYLE><SCRIPT language=Jscript>
    //Copyright (C) 2001 DarkVn. /Mail:[email protected]
    //建议使用IE5.0以上应用本代码.
    //****************************************************//用数组来存储多个timeOut标识.
    tBack=new Array(5);
    tOut=new Array(5);//激活当前选项卡.function menuOut(whichMenu)
    {
    var curMenu=eval("menu"+whichMenu);

    curMenu.runtimeStyle.zIndex=6;

    clearTimeout(tBack[whichMenu]);

    moveOut(whichMenu);
    }
    //恢复初始状态.function menuBack(whichMenu)
    {
    var curMenu=eval("menu"+whichMenu); curMenu.runtimeStyle.zIndex=curMenu.style.zIndex; clearTimeout(tOut[whichMenu]);
    moveBack(whichMenu);}//移动当前选项卡
    function moveOut(curNum)
    {var curMenu=eval("menu"+curNum); if(curMenu.style.posLeft>0) 
    {
    curMenu.style.posLeft-=2; tOut[curNum]=setTimeout("moveOut('"+curNum+"')",1); }}//移回选项卡.function moveBack(curNum)
    {
    var curMenu=eval("menu"+curNum); if(curMenu.style.posLeft<30)
     {

    curMenu.style.posLeft+=2; tBack[curNum]=setTimeout("moveBack('"+curNum+"')",1); }}//鼠标移过时改变表格单元式样。function swapClass()
    {
    var o=event.srcElement; if(o.className=="td1")
     o.className="td2" else if(o.className=="td2") o.className="td1";}document.onmouseover=swapClass;document.onmouseout=swapClass;</SCRIPT><META content="MSHTML 5.00.2920.0" name=GENERATOR></HEAD>
    <BODY bgColor=#ffffff leftMargin=0 text=#000000 topMargin=0 marginheight="0" 
    marginwidth="0">
    <DIV class=maskl id=menuPos 
    style="HEIGHT: 216px; LEFT: 115px; POSITION: absolute; TOP: 59px; WIDTH: 132px; Z-INDEX: 1">
    <DIV id=menu1 onmouseout=menuBack(1) onmouseover=menuOut(1) 
    style="HEIGHT: 20px; LEFT: 30px; POSITION: absolute; TOP: 0px; WIDTH: 130px; Z-INDEX: 1">
    <DIV class=cardbottom id=Layer1 
    style="HEIGHT: 115px; LEFT: 0px; POSITION: absolute; TOP: 17px; WIDTH: 100px; Z-INDEX: 1">
    <TABLE align=center border=0 height="100%" width=75>
      <TBODY>
      <TR>
        <TD class=td1>选项一</TD></TR>
      <TR>
        <TD class=td1>选项二</TD></TR>
      <TR>
        <TD class=td1>选项三</TD></TR>
      <TR>
        <TD class=td1>选项四</TD></TR>
      <TR>
        <TD>&nbsp;</TD></TR></TBODY></TABLE></DIV>
    <TABLE border=0 cellPadding=0 cellSpacing=0 width=100>
      <TBODY>
      <TR>
        <TD height=18 width=14><IMG height=18 src="moveMenu.files/stang.gif" 
          width=14></TD>
        <TD bgColor=#99ccff class=cardtitle height=14 
    width=86>选项卡一</TD></TR></TBODY></TABLE></DIV>
    <DIV id=menu2 onmouseout=menuBack(2) onmouseover=menuOut(2) 
    style="HEIGHT: 20px; LEFT: 30px; POSITION: absolute; TOP: 20px; WIDTH: 130px; Z-INDEX: 1">
    <DIV class=cardbottom id=Layer2 
    style="HEIGHT: 115px; LEFT: 0px; POSITION: absolute; TOP: 17px; WIDTH: 100px; Z-INDEX: 1">
    <TABLE align=center border=0 height="100%" width=75>
      <TBODY>
      <TR>
        <TD class=td1>选项一</TD></TR>
      <TR>
        <TD class=td1>选项二</TD></TR>
      <TR>
        <TD class=td1>选项三</TD></TR>
      <TR>
        <TD class=td1>选项四</TD></TR>
      <TR>
        <TD>&nbsp;</TD></TR></TBODY></TABLE></DIV>
    <TABLE border=0 cellPadding=0 cellSpacing=0 width=100>
      <TBODY>
      <TR>
        <TD height=18 width=14><IMG height=18 src="moveMenu.files/stang.gif" 
          width=14></TD>
        <TD bgColor=#99ccff class=cardtitle height=14 
    width=86>选项卡二</TD></TR></TBODY></TABLE></DIV>
    <DIV id=menu3 onmouseout=menuBack(3) onmouseover=menuOut(3) 
    style="HEIGHT: 20px; LEFT: 30px; POSITION: absolute; TOP: 40px; WIDTH: 130px; Z-INDEX: 1">
    <DIV class=cardbottom id=Layer3 
    style="HEIGHT: 115px; LEFT: 0px; POSITION: absolute; TOP: 17px; WIDTH: 100px; Z-INDEX: 1">
    <TABLE align=center border=0 height="100%" width=75>
      <TBODY>
      <TR>
        <TD class=td1>选项一</TD></TR>
      <TR>
        <TD class=td1>选项二</TD></TR>
      <TR>
        <TD class=td1>选项三</TD></TR>
      <TR>
        <TD class=td1>选项四</TD></TR>
      <TR>
        <TD>&nbsp;</TD></TR></TBODY></TABLE></DIV>
    <TABLE border=0 cellPadding=0 cellSpacing=0 width=100>
      <TBODY>
      <TR>
        <TD height=18 width=14><IMG height=18 src="moveMenu.files/stang.gif" 
          width=14></TD>
        <TD bgColor=#99ccff class=cardtitle height=14 
    width=86>选项卡三</TD></TR></TBODY></TABLE></DIV>
    <DIV id=menu4 onmouseout=menuBack(4) onmouseover=menuOut(4) 
    style="HEIGHT: 20px; LEFT: 30px; POSITION: absolute; TOP: 60px; WIDTH: 130px; Z-INDEX: 1">
    <DIV class=cardbottom id=Layer4 
    style="HEIGHT: 115px; LEFT: 0px; POSITION: absolute; TOP: 17px; WIDTH: 100px; Z-INDEX: 1">
    <TABLE align=center border=0 height="100%" width=75>
      <TBODY>
      <TR>
        <TD class=td1>选项一</TD></TR>
      <TR>
        <TD class=td1>选项二</TD></TR>
      <TR>
        <TD class=td1>选项三</TD></TR>
      <TR>
        <TD class=td1>选项四</TD></TR>
      <TR>
        <TD>&nbsp;</TD></TR></TBODY></TABLE></DIV>
    <TABLE border=0 cellPadding=0 cellSpacing=0 width=100>
      <TBODY>
      <TR>
        <TD height=18 width=14><IMG height=18 src="moveMenu.files/stang.gif" 
          width=14></TD>
        <TD bgColor=#99ccff class=cardtitle height=14 
    width=86>选项卡四</TD></TR></TBODY></TABLE></DIV>
    <DIV id=menu5 onmouseout=menuBack(5) onmouseover=menuOut(5) 
    style="HEIGHT: 134px; LEFT: 30px; POSITION: absolute; TOP: 80px; WIDTH: 130px; Z-INDEX: 1">
    <DIV class=cardbottom id=Layer5 
    style="HEIGHT: 115px; LEFT: 0px; POSITION: absolute; TOP: 17px; WIDTH: 100px; Z-INDEX: 1">
    <TABLE align=center border=0 height="100%" width=75>
      <TBODY>
      <TR>
        <TD class=td1>选项一</TD></TR>
      <TR>
        <TD class=td1>选项二</TD></TR>
      <TR>
        <TD class=td1>选项三</TD></TR>
      <TR>
        <TD class=td1>选项四</TD></TR>
      <TR>
        <TD>&nbsp;</TD></TR></TBODY></TABLE></DIV>
    <TABLE border=0 cellPadding=0 cellSpacing=0 width=100>
      <TBODY>
      <TR>
        <TD height=18 width=14><IMG height=18 src="moveMenu.files/stang.gif" 
          width=14></TD>
        <TD bgColor=#99ccff class=cardtitle height=14 
    width=86>选项卡五</TD></TR></TBODY></TABLE></DIV></DIV>(C)BlueIdea. DarkVn 2001.11 
    <HR>
    </BODY></HTML>