Team:HFUT CHINA/humanpractice slide.js

From 2014.igem.org

Revision as of 02:14, 15 October 2014 by Jadmjgp (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

document.all.wp4.innerHTML=document.all.w4.innerHTML; function autoPlay(divW,speed){ function scr(){ mBox=document.all.w600; iBox=document.all.w4; if(mBox.scrollLeft<iBox.offsetWidth){ mBox.scrollLeft+=divW; } else { mBox.scrollLeft=-mBox.offsetWidth; } var numC=document.all.num; numC.innerHTML=mBox.scrollLeft;//获取滚动数据 } t=setInterval(scr,speed); }

autoPlay(5,50);//自动播放 (滚动像素,滚动时间)