Compatible with FF & amp; IE rolling code
<Table width = 250 border = 0 bgcolor = F6F6F6 style = "margin-top: 15; border: 1px solid # F2F2F2 "height =" 150 "> <tr> <td height =" 100px "> <p id =" scrollcont "style =" overflow: hidden; height: 100px; "onmouseover =" scrolling = 1 "onmouseout =" scrolling = 0 "> <p id =" scrollcont1 "> My Name is tomzhou! Hello, ipaddr Hello, bcomcn My Name is tomzhou2! Hello, ipaddr2 Hello, bcomcn2 </p> <p id = "scrollcont2"> </p> </td> </tr> </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
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Among them, 100px is the height of the rolling area, and the width is determined by the outside container of scrollcont. The 50 in setInterval determines the rolling speed.