这段JS代码什么意思啊?请高手给一下详细的解释,谢谢

<script language="javascript">
<!--
var speed=2;
var demo=document.getElementById("demo");
var demo1=document.getElementById("demo1");
var demo2=document.getElementById("demo2");

demo2.innerHTML=demo1.innerHTML;

function Marquee()
{
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}

var MyMar=setInterval(Marquee,speed);
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
//-->
</script>

第1个回答  2009-03-27
获取IDdemo、demo1、demo2 向左无间隙跑马灯~~~
相似回答