滚动效果

<!--左侧向上滚动代码-->
<script>
function ScrollImgTop(div,begin,end){
var speed=70
end.innerHTML=begin.innerHTML
function Marquee(){
if(end.offsetHeight-div.scrollTop<=0)
div.scrollTop-=begin.offsetHeight
else{div.scrollTop++}
}
var MyMar=setInterval(Marquee,speed)
div.onmouseover=function(){clearInterval(MyMar)}
div.onmouseout=function(){MyMar=setInterval(Marquee,speed)}
}
ScrollImgTop(scroll_div,scroll_begin,scroll_end);
ScrollImgTop(scroll_div2,scroll_begin2,scroll_end2);
</script>
<!--左侧向上滚动代码 ///-->
原文地址:https://www.cnblogs.com/freespider/p/10872559.html