为啥每次照着敲出来一摸一样的代码 效果出不来啊
var area = document.getElementById("moocBox");
var linehigh=24;
area.scrollTop=0;
var time;
area.innerHTML+=area.innerHTML;
function startScroll(){
time=setInterval("scrollUp()",50);
area.scrollTop++;
}
function scrollUp(){
if(area.scrollTop%linehigh==0){
clearInterval(time);
setTimeout(startScroll,2000);
}else{
area.scrollTop++;
if (area.scrollTop>=area.scrollHeight/2) {
area.scrollTop=0;
}
}
}
setTimeout(startScroll,2000)