复制代码 代码如下: /" title=""> <BR>var speed = 20; <BR>var tab = document.getElementById("demo"); <BR>var tab1 = document.getElementById("demo1"); <BR>var tab2 = document.getElementById("demo2"); <BR>tab2.innerHTML = tab1.innerHTML; <BR>function Marquee() { <BR>if (tab2.offsetWidth - tab.scrollLeft <= 0) <BR>tab.scrollLeft -= tab1.offsetWidth <BR>else { <BR>tab.scrollLeft++; <BR>} <BR>} <BR>var MyMar = setInterval(Marquee, speed); <BR>tab.onmouseover = function () { clearInterval(MyMar) }; <BR>tab.onmouseout = function () { MyMar = setInterval(Marquee, speed) }; <BR>