]
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>
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn