function init2() 

if(um1nr < um1length){ 
document.write('<tr><td align="center"><a href="'+um1[um1nr3]+'">'+um1[um1nr2]+'</a></td></tr>'); 
um1nr++; 
um1nr2=um1nr2+2; 
um1nr3=um1nr3+2; 
init2(); 

else{ 
init3(); 


function init3() 

if(bw.ie6 || bw.ie4 || bw.ie5){ 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="m1" style="position:absolute;top:20;left:0">') 
document.write('<div style="background-color:'+bgcolorDark+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"><a href="javascript:do_m2_ie()">'+um2[0]+'</a></td></tr>') 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="um2" style="position:absolute;top:20;left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127;border-bottom-width:0px">') 
document.write('<table align="center">') 

else if(bw.ns4){ 
document.write('</table>') 
document.write('</layer>') 
document.write('<layer id="m1" position="absolute" top="21" left="0">') 
document.write('<layer bgcolor="'+bordercolor+'" width="125">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"></td></tr>') 
document.write('</table>') 
document.write('</layer>') 
document.write('<layer bgcolor="'+bgcolorDark+'" width="125" position="absolute" top="1" left="0">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"><a href="javascript:do_m2_n()">'+um2[0]+'</a></td></tr>') 
document.write('</table>') 
document.write('</layer>') 
document.write('<layer bgcolor="'+bordercolor+'" width="125" position="absolute" top="21" left="0">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"></td></tr>') 
document.write('</table>') 
document.write('</layer>') 
document.write('<layer id="um2" position="absolute" top="22" left="0" bgcolor="'+bgcolorLight+'" width="125">') 
document.write('<table align="center">') 

else if(bw.ns5){ 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="m1" style="position:absolute;top:18;left:0">') 
document.write('<div style="background-color:'+bgcolorDark+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"><a href="javascript:do_m2_n6()">'+um2[0]+'</a></td></tr>') 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="um2" style="position:absolute;top:18;left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127;border-bottom-width:0px">') 
document.write('<table align="center">') 

else{ 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="m1" style="position:absolute;top:'+((um1.length-1)/2*17.5+20)+';left:0">') 
document.write('<div style="background-color:'+bgcolorDark+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"><a href="#">'+um2[0]+'</a></td></tr>') 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="um2" style="position:absolute;top:20;left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127;border-bottom-width:0px">') 
document.write('<table align="center">') 

init4(); 

function init4() 

if(um2nr < um2length){ 
document.write('<tr><td align="center"><a href="'+um2[um2nr3]+'">'+um2[um2nr2]+'</a></td></tr>'); 
um2nr++; 
um2nr2=um2nr2+2; 
um2nr3=um2nr3+2; 
init4(); 

else{ 
init5(); 


function init5() 

if(bw.ie6 || bw.ie4 || bw.ie5){ 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="m2" style="position:absolute;top:20;left:0">') 
document.write('<div style="background-color:'+bgcolorDark+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"><a href="javascript:do_m3_ie()">'+um3[0]+'</a></td></tr>') 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="um3" style="position:absolute;top:20;left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127;border-bottom-width:0px">') 
document.write('<table align="center">') 

else if(bw.ns4){ 
document.write('</table>') 
document.write('</layer>') 
document.write('<layer id="m2" position="absolute" top="21" left="0">') 
document.write('<layer bgcolor="'+bordercolor+'" width="125">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"></td></tr>') 
document.write('</table>') 
document.write('</layer>') 
document.write('<layer bgcolor="'+bgcolorDark+'" width="125" position="absolute" top="1" left="0">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"><a href="javascript:do_m3_n()">'+um3[0]+'</a></td></tr>') 
document.write('</table>') 
document.write('</layer>') 
document.write('<layer bgcolor="'+bordercolor+'" width="125" position="absolute" top="21" left="0">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"></td></tr>') 
document.write('</table>') 
document.write('</layer>') 
document.write('<layer id="um3" position="absolute" top="22" left="0" bgcolor="'+bgcolorLight+'" width="125">') 
document.write('<table align="center">') 

else if(bw.ns5){ 
document.write('<tr><td align="center"><a href="'+um1[24]+'">'+um1[23]+'</a></td></tr>'); 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="m1" style="position:absolute;top:18;left:0">') 
document.write('<div style="background-color:'+bgcolorDark+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"><a href="javascript:do_m2_n6()">'+um2[0]+'</a></td></tr>') 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="um2" style="position:absolute;top:18;left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127;border-bottom-width:0px">') 
document.write('<table align="center">') 

else{ 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="m2" style="position:absolute;top:'+((um2.length-1)/2*17.5+20)+';left:0">') 
document.write('<div style="background-color:'+bgcolorDark+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127">') 
document.write('<table align="center">') 
document.write('<tr><td align="center"><a href="#">'+um3[0]+'</a></td></tr>') 
document.write('</table>') 
document.write('</div>') 
document.write('<div id="um3" style="position:absolute;top:20;left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:127;border-bottom-width:0px">') 
document.write('<table align="center">') 

init6(); 

解决方案 »

  1.   

    function init6() 

    if(um3nr < um3length){ 
    document.write('<tr><td align="center"><a href="'+um3[um3nr3]+'">'+um3[um3nr2]+'</a></td></tr>'); 
    um3nr++; 
    um3nr2=um3nr2+2; 
    um3nr3=um3nr3+2; 
    init6(); 

    else{ 
    init7(); 


    function init7() 

    if(bw.ie6 || bw.ie5 || bw.ie4){ 
    document.write('</table>') 
    document.write('</div>') 
    document.write('<div id="m3" style="height:'+((um3.length-1)/2*17.5+20+5)+';position:absolute;top:20;left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';border-bottom-width:0px;width:127">') 
    document.write('</div></div></div></div>') 

    else if(bw.ns4){ 
    document.write('</table>') 
    document.write('</layer>') 
    document.write('<layer id="m3" position="absolute" top="21" left="0" width="125" height="'+((um3.length-1)/2*20+20)+'" bgcolor="'+bgcolorLight+'">') 
    document.write('<layer bgcolor="'+bordercolor+'" width="125" height="1">') 
    document.write('</table></layer></table></layer></layer></layer></layer></layer>') 

    else if(bw.ns5){ 
    document.write('</table>') 
    document.write('</div>') 
    document.write('<div id="m3" style="height:'+((um3.length-1)/2*17.5+20+5)+';position:absolute;top:18;left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';border-bottom-width:0px;width:127">') 
    document.write('</div></div></div></div>') 

    else{ 
    document.write('</table>') 
    document.write('</div>') 
    document.write('<div id="m3" style="height:2;position:absolute;top:'+((um3.length-1)/2*17.5+20+5)+';left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';border-bottom-width:0px;width:127">') 
    document.write('</div></div></div></div>') 


    var m1pos_ie=20, m1jump_ie=-5; 
    var m2pos_ie=20, m2jump_ie=-5; 
    var m3pos_ie=20, m3jump_ie=-5; 
    var m1pos_n6=18, m1jump_n6=-6; 
    var m2pos_n6=18, m2jump_n6=-6; 
    var m3pos_n6=18, m3jump_n6=-6; 
    var m1pos_n=21, m1jump_n=-5; 
    var m2pos_n=21, m2jump_n=-5; 
    var m3pos_n=21, m3jump_n=-5; 
    var time=5; 
    function do_m1_ie() 

    if(m2pos_ie>0) 

    m2jump_ie=-5; 
    if(m2pos_ie>=(um2.length-1)/2*17.5+20) 
    m2_move_ie(); 
    } if(m3pos_ie>0) 

    m3jump_ie=-5; 
    if(m3pos_ie>=(um3.length-1)/2*17.5+20) 
    m3_move_ie(); 
    } m1jump_ie=-m1jump_ie; 
    if(m1pos_ie<=20 || m1pos_ie>=(um1.length-1)/2*17.5+20) 
    m1_move_ie(); 
    } function m1_move_ie(witch) 

    document.all.m1.style.top=m1pos_ie; 
    m1pos_ie+=m1jump_ie; if(m1pos_ie>15 && m1pos_ie<(um1.length-1)/2*17.5+20+5) 
    setTimeout("m1_move_ie()", time); 

    function do_m2_ie() 

    if(m1pos_ie>0) 

    m1jump_ie=-5; 
    if(m1pos_ie>=(um1.length-1)/2*17.5+20) 
    m1_move_ie(); 
    } if(m3pos_ie>0) 

    m3jump_ie=-5; 
    if(m3pos_ie>=(um3.length-1)/2*17.5+20) 
    m3_move_ie(); 
    } m2jump_ie=-m2jump_ie; 
    if(m2pos_ie<=20 || m2pos_ie>=(um2.length-1)/2*17.5+20) 
    m2_move_ie(); 
    } function m2_move_ie() 

    document.all.m2.style.top=m2pos_ie; 
    m2pos_ie+=m2jump_ie; if(m2pos_ie>15 && m2pos_ie<(um2.length-1)/2*17.5+20+5) 
    setTimeout("m2_move_ie()", time); 
    } function do_m3_ie() 

    if(m2pos_ie>0) 

    m2jump_ie=-5; 
    if(m2pos_ie>=(um2.length-1)/2*17.5+20) 
    m2_move_ie(); 
    } if(m1pos_ie>0) 

    m1jump_ie=-5; 
    if(m1pos_ie>=(um1.length-1)/2*17.5+20) 
    m1_move_ie(); 
    } m3jump_ie=-m3jump_ie; 
    if(m3pos_ie<=20 || m3pos_ie>=(um3.length-1)/2*17.5+20) 
    m3_move_ie(); 
    } function m3_move_ie() 

    document.all.m3.style.top=m3pos_ie; 
    m3pos_ie+=m3jump_ie; if(m3pos_ie>15 && m3pos_ie<(um3.length-1)/2*17.5+20+5) 
    setTimeout("m3_move_ie()", time); 

    function do_m1_n() 

    if(m2pos_n>0) 

    m2jump_n=-5; 
    if(m2pos_n>=(um2.length-1)/2*20+20) 
    m2_move_n(); 
    } if(m3pos_n>0) 

    m3jump_n=-5; 
    if(m3pos_n>=(um3.length-1)/2*20+20) 
    m3_move_n(); 
    } m1jump_n=-m1jump_n; 
    if(m1pos_n<=21 || m1pos_n>=(um1.length-1)/2*20+20) 
    m1_move_n(); 

    function m1_move_n() 

    document.m.document.m1.top=m1pos_n; 
    m1pos_n+=m1jump_n; if(m1pos_n>=20 && m1pos_n<(um1.length-1)/2*20+20) 
    setTimeout("m1_move_n()", time); 

    function do_m2_n() 

    if(m1pos_n>0) 

    m1jump_n=-5; 
    if(m1pos_n>=(um1.length-1)/2*20+20) 
    m1_move_n(); 
    } if(m3pos_n>0) 

    m3jump_n=-5; 
    if(m3pos_n>=(um3.length-1)/2*20+20) 
    m3_move_n(); 
    } m2jump_n=-m2jump_n; 
    if(m2pos_n<=21 || m2pos_n>=(um2.length-1)/2*20+20) 
    m2_move_n(); 
    } function m2_move_n() 

    document.m.document.m1.document.m2.top=m2pos_n; 
    m2pos_n+=m2jump_n; if(m2pos_n>20 && m2pos_n<(um2.length-1)/2*20+20) 
    setTimeout("m2_move_n()", time); 
    } function do_m3_n() 

    if(m2pos_n>0) 

    m2jump_n=-5; 
    if(m2pos_n>=(um2.length-1)/2*20+20) 
    m2_move_n(); 
    } if(m1pos_n>0) 

    m1jump_n=-5; 
    if(m1pos_n>=(um1.length-1)/2*20+20) 
    m1_move_n(); 
    } m3jump_n=-m3jump_n; 
    if(m3pos_n<=21 || m3pos_n>=(um3.length-1)/2*20+20) 
    m3_move_n(); 
    } function m3_move_n() 

    document.m.document.m1.document.m2.document.m3.top=m3pos_n; 
    m3pos_n+=m3jump_n; if(m3pos_n>20 && m3pos_n<(um3.length-1)/2*20+20) 
    setTimeout("m3_move_n()", time); 

    function do_m1_n6() 

    if(m2pos_n6>0) 

    m2jump_n6=-6; 
    if(m2pos_n6>=(um2.length-1)/2*17.5+20) 
    m2_move_n6(); 
    } if(m3pos_n6>0) 

    m3jump_n6=-6; 
    if(m3pos_n6>=(um3.length-1)/2*17.5+20) 
    m3_move_n6(); 
    } m1jump_n6=-m1jump_n6; 
    if(m1pos_n6<=18 || m1pos_n6>=(um1.length-1)/2*17.5+20) 
    m1_move_n6(); 
    } function m1_move_n6() 

    document.getElementById('m1').style.top=m1pos_n6; 
    m1pos_n6+=m1jump_n6; if(m1pos_n6>15 && m1pos_n6<(um1.length-1)/2*17.5+20+5) 
    setTimeout("m1_move_n6()", time); 

    function do_m2_n6() 

    if(m1pos_n6>0) 

    m1jump_n6=-6; 
    if(m1pos_n6>=(um1.length-1)/2*17.5+20) 
    m1_move_n6(); 
    } if(m3pos_n6>0) 

    m3jump_n6=-6; 
    if(m3pos_n6>=(um3.length-1)/2*17.5+20) 
    m3_move_n6(); 
    } m2jump_n6=-m2jump_n6; 
    if(m2pos_n6<=18 || m2pos_n6>=(um2.length-1)/2*17.5+20) 
    m2_move_n6(); 
    } function m2_move_n6() 

    document.getElementById('m2').style.top=m2pos_n6; 
    m2pos_n6+=m2jump_n6; if(m2pos_n6>15 && m2pos_n6<(um2.length-1)/2*17.5+20+5) 
    setTimeout("m2_move_n6()", time); 
    } function do_m3_n6() 

    if(m2pos_n6>0) 

    m2jump_n6=-6; 
    if(m2pos_n6>=(um2.length-1)/2*17.5+20) 
    m2_move_n6(); 
    } if(m1pos_n6>0) 

    m1jump_n6=-6; 
    if(m1pos_n6>=(um1.length-1)/2*17.5+20) 
    m1_move_n6(); 
    } m3jump_n6=-m3jump_n6; 
    if(m3pos_n6<=18 || m3pos_n6>=(um3.length-1)/2*17.5+20) 
    m3_move_n6(); 
    } function m3_move_n6() 

    document.getElementById('m3').style.top=m3pos_n6; 
    m3pos_n6+=m3jump_n6; if(m3pos_n6>15 && m3pos_n6<(um3.length-1)/2*17.5+20+5) 
    setTimeout("m3_move_n6()", time); 

    //--> 
    </script> 
    </body> 
    </html>
      

  2.   

    你想办法查CSDN网站的代码啊, 主页面上的菜单就是你所要的样子, 可以分析一下他们的JS代码啊