谁帮我改改这个代码
代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang=it dir=ltr xml:lang="it" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>css+js控制文字滚动 </title>
<script language="javascript">
<!--
function scrollup(o,d,c)
{
if(d==c)
{
var t=o.firstChild.cloneNode(true);
o.removeChild(o.firstChild);o.appendChild(t);
t.style.marginLeft=o.firstChild.style.marginLeft='0px';
hscroll(o);
}
else
{
ch=false;var s=3,c=c+s,l=(c>=d?c-d:0);
o.firstChild.style.marginLeft=-c+l+'px';
window.setTimeout(function(){scrollup(o,d,c-l)},50);//50改变滚动速度的
}
}
function hscroll(o)
{
var w1=o.firstChild.offsetHeight,w2=o.offsetHeight;
if(w1 <=w2)return;
tc=window.setTimeout(function(){hs(o,w1-w2,0,w1-w2)},3500);
}
function hs(o,d,c,p)
{
c++;var t=(c>0?-c:c);o.firstChild.style.marginTop=t+'px';
if(c==d)
{
if(d==0)
{
tc=window.setTimeout(function(){hs(o,p,0,p)},2500);
}
else
tc=window.setTimeout(function(){hs(o,0,-p,p)},3500);
}
else
tc=window.setTimeout(function(){hs(o,d,c,p)},5);
}
//-->
</script>
</head>
<body>
<div id="UpInfo" style="overflow:hidden; text-align:left; height:20px; width:444px;">
<div style="float:left; width:444px;">开11111111111完 </div>
<div style="float:left; width:444px;">开22222222222完 </div>
<div style="float:left; width:444px;">开33333333333333完 </div>
<div style="float:left; width:444px;">开4444444444444完 </div>
<div style="float:left; width:444px;">开55555555555555555555 </div>
<div style="float:left; width:444px;">开66666666完 </div>
<div style="float:left; width:444px;">开77777777777完 </div>
<div style="float:left; width:444px;">开88888888888888888888888888完 </div>
<div style="float:left; width:444px;">开999999999999完 </div>
<div style="float:left; width:444px;">开000000000完 </div>
</div>
<script language="javascript">
var tc;
window.onload=function()
{
var o=document.getElementById('UpInfo');hscroll(o);
window.setInterval(function(){window.clearTimeout(tc);o.firstChild.style.marginTop='0px';scrollup(o,40,0);},3000);
}
</script>
</body>
</html>