1 //左右不断循环滚动 2 var splep=30; 3 demo2.innerHTML=demo1.innerHTML; 4 var _left = demo1.offsetWidth; 5 var mymarq=setInterval(marquee,splep); 6 demo.οnmοuseοver=function(){ clearInterval(mymarq);} 7 demo.οnmοuseοut=function(){ mymarq=setInterval(marquee,splep);} 8 function marquee(){ 9 if((_left - demo.scrollLeft) <= 0){ 10 demo.scrollLeft = 0; 11 }else{ 12 ++demo.scrollLeft; 13 } 14 }