![基于javascript滚动图片具体实现_javascript技巧](http://files.jb51.net/file_images/article/201311/20131118164518861.png)
前台:
javascript:
var speed=12; //数字越大速度越慢
var tab=document.getElementById("index_foot_slide");
var tab1=document.getElementById("index_foot_slide1");
var tab2=document.getElementById("index_foot_slide2");
tab2.innerHTML=tab1.innerHTML;
function Marquee(){
if(tab.scrollLeft tab.scrollLeft+=tab2.offsetWidth
else{
tab.scrollLeft--
}
}
var MyMar=setInterval(Marquee,speed);
tab.onmouseover=function() {clearInterval(MyMar)};
tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};