]
Among them, 100px is the scroll area The height and width are determined by the outer container of scrollcont, and the 50 in setInterval determines the scrolling speed. <script>
var scrolling=0;
var t=scrollcont.scrollTop;
scrollcont2.innerHTML=scrollcont1.innerHTML;
function scrollShow()
{
if (scrolling==1) return;
if (scrollcont2.offsetTop-scrollcont.scrollTop<=0)
scrollcont.scrollTop-=scrollcont1.offsetHeight;
else
scrollcont.scrollTop++;
}
setInterval(scrollShow,50);
</script>