<textarea id="runcode9792"><table width=250 border=0 bgcolor=f6f6f6 height= "" > <tr> <td height= "100px" > <div id= "sc Rollcont "onmouseover=" scrolling=1 "onmouseout=" scrolling=0 "> <div id=" scrollcont1 "> My Name is tomzhou! Hello,ipaddr HELLO,BCOMCN my Name is tomzhou2! HELLO,IPADDR2 hello,bcomcn2 </div> <div id= "Scrollcont2" ></div> </div> </td> </t R> </table> <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></textarea>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Where 100px is the height of the rolling area, the width is determined by the outer container of the Scrollcont, and the 50 inside the setinterval determines the speed of the scroll.