The example in this article describes the js method of stopping image scrolling when the mouse passes over it. Share it with everyone for your reference. The specific implementation method is as follows:
When the mouse passes over, image scrollingstops the effect title>
Scroll left
<script><br>
<!--<br />
var speed=10;<br />
var tab=document.getElementById("www_jb51_net");<br />
var tab1=document.getElementById("demo1");<br />
var tab2=document.getElementById("demo2");<br />
tab2.innerHTML=tab1.innerHTML;<br />
function Marquee(){<br />
if(tab2.offsetWidth-tab.scrollLeft<=0)<br />
tab.scrollLeft-=tab1.offsetWidth<br />
else{<br />
tab.scrollLeft ;<br />
}<br />
}<br />
var MyMar=setInterval(Marquee,speed);<br />
tab.onmouseover=function() {clearInterval(MyMar)};<br />
tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};<br />
--><br>
</script>
I hope this article will be helpful to everyone’s JavaScript programming design.