/*------------无缝滚动------*/ window.onload=function(){ var B=document.getElementById("scroll"); var L=document.getElementById("left"); var R=document.getElementById("right"); R.innerHTML=L.innerHTML; var timer4=setInterval(fun,20); function fun(){ if(L.offsetWidth-B.scrollLeft<=0) { B.scrollLeft=0; } else { B.scrollLeft++; } } B.onmouseover=function(){ clearInterval(timer4); } B.onmouseout=function(){ timer4=setInterval(fun, 20) } }