<script language= "JavaScript" > var speed=80; demo2.innerhtml=demo1.innerhtml; Clone Demo1 for Demo2
function Marquee () { if (demo2.offsetwidth <= demo.scrollleft) {//when scrolling to the junction of Demo1 and Demo2 Demo.scrollleft = Demo.scrollleft-demo1.offsetwidth; Demo Jump to the top } else{ demo.scrollleft++; } }
var mymar=setinterval (marquee,speed); Set timer
Demo.onmouseover=function () {clearinterval (MyMar);} Clear timer to achieve scrolling stop on mouse move Demo.onmouseout=function () {mymar=setinterval (marquee,speed);} Reset timer when mouse moves </script>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.