在线等待。修改JS代码。急死了~~~~给分!

xanewong111 2003-01-08 08:25:45
<style type="text/css">

<!--



a{text-decoration:none;color:#000000;font-size:8pt;font-family:verdana}

//-->

</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td height="100%" valign="top" bgcolor="#F5F5F5">
<script language="JavaScript">

<!--







var top=0;



var left=0;



var bordercolor="#000000";



var bgcolorLight="#EFEFEF";



var bgcolorDark="#DFDFDF";









um1 = new Array("Menu1",

"Link1_um1", "http:///",

"Link2_um1", "http:///",

"Link3_um1", "http:///",

"Link4_um1", "http:///",

"Link5_um1", "http:///",

"Link6_um1", "http:///")



um2 = new Array("Menu2",

"Link1_um2", "http:///",

"Link2_um2", "http:///",

"Link3_um2", "http:///",

"Link4_um2", "http:///")



um3 = new Array("Menu3",

"Link1_um3", "http:///",

"Link2_um3", "http:///",

"Link3_um3", "http:///",

"Link4_um3", "http:///",

"Link5_um3", "http:///",

"Link6_um3", "http:///",

"Link7_um3", "http:///",

"Link8_um3", "http:///",

"Link9_um3", "http:///",

"Link10_um3", "http:///",

"Link11_um3", "http:///",

"Link12_um3", "http:///",

"Link13_um3", "http:///",

"Link14_um3", "http:///",

"Link15_um3", "http:///",

"Link16_um3", "http:///")

//-->

</script>
<script language="JavaScript">

<!--



function checkBrowser(){

this.ver=navigator.appVersion

this.dom=document.getElementById?1:0

this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;

this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;

this.ie4=(document.all && !this.dom)?1:0;

this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;

this.ns4=(document.layers && !this.dom)?1:0;

this.mac=(this.ver.indexOf('Mac') > -1) ?1:0;

this.ope=(navigator.userAgent.indexOf('Opera')>-1);

this.ie=(this.ie6 || this.ie5 || this.ie4)

this.ns=(this.ns4 || this.ns5)

this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns5 || this.ns4 || this.mac || this.ope)

this.nbw=(!this.bw)

return this}

bw=new checkBrowser()



var um1length = ((um1.length-1)/2);

var um2length = ((um2.length-1)/2);

var um3length = ((um3.length-1)/2);



var um1nr = 0;

var um1nr2 = 1;

var um1nr3 = 2;

var um2nr = 0;

var um2nr2 = 1;

var um2nr3 = 2;

var um3nr = 0;

var um3nr2 = 1;

var um3nr3 = 2;



init();



function init()

{

height=document.body.offsetHeight-25;

document.write('<div id="menubg" style="position:absolute;top:0;left:'+left+';background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:150;height:'+height+';border-top-width:0px">')

document.write('</div>')

document.write('<div id="m" style="position:absolute;top:'+top+';left:'+left+'">')

document.write('<div style="background-color:'+bgcolorDark+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:150">')

document.write('<table align="center">')

document.write('<tr><td align="center"><a href="javascript:do_m1_ie()">'+um1[0]+'</a></td></tr>')

document.write('</table>')

document.write('</div>')

document.write('<div id="um1" style="position:absolute;top:20;left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:150;border-bottom-width:0px">')

document.write('<table align="center">');

}

init2();

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()

{

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:150">')

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:150;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()

{

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:150">')

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:150;border-bottom-width:0px">')

document.write('<table align="center">')

}

init6();

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()

{

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:150">')

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();

}

以上代码是一个导航条的,现在是3项,意思就是3个大栏目,N个小栏目,我想在加一个大栏目,就是menu4,我改了一天了也没改好,哪位高手帮忙指点。谢谢,
...全文
63 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
ar7_top 2003-01-09
  • 打赏
  • 举报
回复
给分给分

霍霍霍

:)
ar7_top 2003-01-09
  • 打赏
  • 举报
回复

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_m4_ie()
{
if(m3pos_ie>0)
{
m3jump_ie=-5;
if(m3pos_ie>=(um3.length-1)/2*17.5+20)
m3_move_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();
}
m4jump_ie=-m4jump_ie;
if(m4pos_ie<=20 || m4pos_ie>=(um4.length-1)/2*17.5+20)
m4_move_ie();
}

function m4_move_ie()
{
document.all.m4.style.top=m4pos_ie;
m4pos_ie+=m4jump_ie;
if(m4pos_ie>15 && m4pos_ie<(um4.length-1)/2*17.5+20+5)
setTimeout("m4_move_ie()", time);
}

function do_m1_n()
{
if(m4pos_n>0)
{
m4jump_n=-5;
if(m4pos_n>=(um4.length-1)/2*20+20)
m4_move_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(m4pos_n>0)
{
m4jump_n=-5;
if(m4pos_n>=(um4.length-1)/2*20+20)
m4_move_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(m4pos_n>0)
{
m4jump_n=-5;
if(m4pos_n>=(um4.length-1)/2*20+20)
m4_move_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_m4_n()
{
if(m3pos_n>0)
{
m3jump_n=-5;
if(m3pos_n>=(um3.length-1)/2*20+20)
m3_move_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();
}

m4jump_n=-m3jump_n;

if(m4pos_n<=21 || m4pos_n>=(um4.length-1)/2*20+20)
m4_move_n();
}

function m4_move_n()
{
document.m.document.m1.document.m2.document.m3.document.m4.top=m4pos_n;
m4pos_n+=m4jump_n;
if(m4pos_n>20 && m4pos_n<(um4.length-1)/2*20+20)
setTimeout("m4_move_n()", time);
}









function do_m1_n6()
{
if(m4pos_n6>0)
{
m4jump_n6=-6;
if(m4pos_n6>=(um4.length-1)/2*17.5+20)
m4_move_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(m4pos_n6>0)
{
m4jump_n6=-6;
if(m4pos_n6>=(um4.length-1)/2*17.5+20)
m4_move_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(m4pos_n6>0)
{
m4jump_n6=-6;
if(m4pos_n6>=(um4.length-1)/2*17.5+20)
m4_move_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);
}
function do_m4_n6()
{
if(m3pos_n6>0)
{
m3jump_n6=-6;
if(m3pos_n6>=(um3.length-1)/2*17.5+20)
m3_move_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();
}

m4jump_n6=-m4jump_n6;
if(m4pos_n6<=18 || m4pos_n6>=(um4.length-1)/2*17.5+20)
m4_move_n6();
}

function m4_move_n6()
{
document.getElementById('m4').style.top=m4pos_n6;
m4pos_n6+=m4jump_n6;
if(m4pos_n6>15 && m4pos_n6<(um4.length-1)/2*17.5+20+5)
setTimeout("m4_move_n6()", time);
}

//-->

</SCRIPT>
</TR></TBODY></TABLE></BODY></HTML>
linday 2003-01-09
  • 打赏
  • 举报
回复
这么长,,,谁敢看。。
ar7_top 2003-01-09
  • 打赏
  • 举报
回复

function init3()
{
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:150">')
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:150;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()
{
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:150">')
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:150;border-bottom-width:0px">')
document.write('<table align="center">')
}

init6();

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
{
init8();
}
}


function init8()
{
document.write('</table>')
document.write('</div>')
document.write('<div id="m3" style="position:absolute;top:20;left:0">')
document.write('<div style="background-color:'+bgcolorDark+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:150">')
document.write('<table align="center">')
document.write('<tr><td align="center"><a href="javascript:do_m4_ie()">'+um4[0]+'</a></td></tr>')
document.write('</table>')
document.write('</div>')
document.write('<div id="um4" style="position:absolute;top:20;left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:150;border-bottom-width:0px">')
document.write('<table align="center">')
}

init9();

function init9()
{
if(um4nr < um4length)
{
document.write('<tr><td align="center"><a href="'+um4[um4nr3]+'">'+um4[um4nr2]+'</a></td></tr>');
um4nr++;
um4nr2=um4nr2+2;
um4nr3=um4nr3+2;
init9();
}
else
{
init10();
}
}

function init10()
{
var MaskLength=0;
if (um1.length>MaskLength)
MaskLength=um1.length;
if (um2.length>MaskLength)
MaskLength=um2.length;
if (um3.length>MaskLength)
MaskLength=um3.length;
if (um4.length>MaskLength)
MaskLength=um4.length;

document.write('</table>')
document.write('</div>')
document.write('<div id="m4" style="height:'+((MaskLength-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:150">')
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 m4pos_ie=20, m4jump_ie=-5;

var m1pos_n6=18, m1jump_n6=-6;
var m2pos_n6=18, m2jump_n6=-6;
var m3pos_n6=18, m3jump_n6=-6;
var m4pos_n6=18, m4jump_n6=-6;

var m1pos_n=21, m1jump_n=-5;
var m2pos_n=21, m2jump_n=-5;
var m3pos_n=21, m3jump_n=-5;
var m4pos_n=21, m4jump_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();
}
if(m4pos_ie>0)
{
m4jump_ie=-5;
if(m4pos_ie>=(um4.length-1)/2*17.5+20)
m4_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();
}
if(m4pos_ie>0)
{
m4jump_ie=-5;
if(m4pos_ie>=(um4.length-1)/2*17.5+20)
m4_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();
}
if(m4pos_ie>0)
{
m4jump_ie=-5;
if(m4pos_ie>=(um4.length-1)/2*17.5+20)
m4_move_ie();
}
m3jump_ie=-m3jump_ie;
if(m3pos_ie<=20 || m3pos_ie>=(um3.length-1)/2*17.5+20)
m3_move_ie();
}
ar7_top 2003-01-09
  • 打赏
  • 举报
回复
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0031)http://www.kissly.net/war/1.htm -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>A {
FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
</STYLE>

<META content="MSHTML 6.00.2800.1126" name=GENERATOR></HEAD>
<BODY>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top bgColor=#f5f5f5 height="100%">
<SCRIPT language=JavaScript>
<!--
var top=0;
var left=0;
var bordercolor="#000000";
var bgcolorLight="#EFEFEF";
var bgcolorDark="#DFDFDF";


um1 = new Array("Menu1",
"Link1_um1", "http:///",
"Link2_um1", "http:///",
"Link3_um1", "http:///",
"Link4_um1", "http:///",
"Link5_um1", "http:///",
"Link6_um1", "http:///")

um2 = new Array("Menu2",
"Link1_um2", "http:///",
"Link2_um2", "http:///",
"Link3_um2", "http:///",
"Link4_um2", "http:///")

um3 = new Array("Menu3",
"Link1_um3", "http:///",
"Link2_um3", "http:///",
"Link3_um3", "http:///",
"Link4_um3", "http:///",
"Link5_um3", "http:///",
"Link6_um3", "http:///",
"Link7_um3", "http:///",
"Link8_um3", "http:///",
"Link9_um3", "http:///",
"Link10_um3", "http:///",
"Link11_um3", "http:///",
"Link12_um3", "http:///",
"Link13_um3", "http:///",
"Link14_um3", "http:///",
"Link15_um3", "http:///",
"Link16_um3", "http:///")

um4 = new Array("Menu4",
"Link1_um4", "http:///",
"Link2_um4", "http:///",
"Link3_um4", "http:///",
"Link4_um4", "http:///")

//-->

</SCRIPT>

<SCRIPT language=JavaScript>

<!--
function checkBrowser()
{
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.mac=(this.ver.indexOf('Mac') > -1) ?1:0;
this.ope=(navigator.userAgent.indexOf('Opera')>-1);
this.ie=(this.ie6 || this.ie5 || this.ie4)
this.ns=(this.ns4 || this.ns5)
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns5 || this.ns4 || this.mac || this.ope)
this.nbw=(!this.bw)
return this
}

bw=new checkBrowser()

var um1length = ((um1.length-1)/2);
var um2length = ((um2.length-1)/2);
var um3length = ((um3.length-1)/2);
var um4length = ((um4.length-1)/2);

var um1nr = 0;
var um1nr2 = 1;
var um1nr3 = 2;
var um2nr = 0;
var um2nr2 = 1;
var um2nr3 = 2;
var um3nr = 0;
var um3nr2 = 1;
var um3nr3 = 2;
var um4nr = 0;
var um4nr2 = 1;
var um4nr3 = 2;

init();

function init()
{
height=document.body.offsetHeight-25;
document.write('<div id="menubg" style="position:absolute;top:0;left:'+left+';background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:150;height:'+height+';border-top-width:0px">')
document.write('</div>')
document.write('<div id="m" style="position:absolute;top:'+top+';left:'+left+'">')
document.write('<div style="background-color:'+bgcolorDark+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:150">')
document.write('<table align="center">')
document.write('<tr><td align="center"><a href="javascript:do_m1_ie()">'+um1[0]+'</a></td></tr>')
document.write('</table>')
document.write('</div>')
document.write('<div id="um1" style="position:absolute;top:20;left:0;background-color:'+bgcolorLight+';border-style:solid;border-width:1px;border-color:'+bordercolor+';width:150;border-bottom-width:0px">')
document.write('<table align="center">');
}

init2();

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();
}

}
烂笔头Danky 2003-01-08
  • 打赏
  • 举报
回复
看这样杂乱的代码简直就好像进地狱!
newman0708 2003-01-08
  • 打赏
  • 举报
回复
这段代码我觉得好像是在firework中产生的,上次我同学的作业中遇到过。

不过我也没有帮他实现类似你的功能。
zykj_2000 2003-01-08
  • 打赏
  • 举报
回复
太长了
xanewong111 2003-01-08
  • 打赏
  • 举报
回复

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>




这是第二段代码,和上面的代码拼到一起用

87,994

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧