<Div id = "Demo" style = "overflow: hidden; width: 50px; "> <Table> <tr> <TD id =" demo1 "> <Table width =" 150 "> <tr> <TD width =" 130 "> 1 </TD> <TD width = "130"> 2 </TD> <TD width = "130"> 3 </TD> <TD width = "130"> 4 </TD> <TD width = "130"> 5 </TD> <TD width = "130"> 6 </TD> <TD width = "130"> 7 </TD> <TD width = "130"> 8 </TD> <TD width = "130"> 9 </TD> <TD width = "130"> 10 </TD> <TD width = "130"> 11 </TD> <TD width = "130"> 12 </TD> <TD width = "130"> 13 </TD> <TD width = "130"> 14 </TD> <TD width = "130"> 15 </TD> </tr> </table> </TD> <TD id = "demo2 "> </TD> </tr> </table> </div> <a href =" javascript: void (0); "onmouseover =" overmar (1); "onmouseout =" outmar (); "> left scroll </a> <a href =" javascript: void (0); "onmouseover =" overmar (0); "onmouseout =" outmar (); "> right scroll </A> <SCRIPT> var speed = 50 // The greater the speed, the slower the speed. var mymar; document. getelementbyid ("demo2 "). innerhtml = document. getelementbyid ("demo1 "). innerhtml; // move left function marqueeadd () {If (document. getelementbyid ("demo2 "). offsetWidth-document.getElementById ("Demo "). scrollleft <= 0) {document. getelementbyid ("Demo "). scrollleft = document. getelementbyid ("Demo "). scrollLeft-document.getElementById ("demo1 "). offsetwidth;} else {document. getelementbyid ("Demo "). scrollleft ++ }}// right-move function marqueedes () {If (document. getelementbyid ("demo2 "). offsetWidth-document.getElementById ("Demo "). scrollleft> = 0) {document. getelementbyid ("Demo "). scrollleft = document. getelementbyid ("Demo "). scrollleft + document. getelementbyid ("demo1 "). offsetwidth;} else {document. getelementbyid ("Demo "). scrollleft -- ;}// draw the stop function outmar () {clearinterval (mymar);} // scroll over the scroll function overmar (jadge) {If (jadge = 0) {mymar = setinterval (marqueeadd, speed) ;}else {mymar = setinterval (marqueedes, speed) ;}// mymar = setinterval (marqueeadd, speed ); // automatically move left // mymar = setinterval (marqueedes, speed); // automatically move right </SCRIPT>