图片水平滚动代码

 

Code
<!--图片滚动代码开始-->
<DIV id=demo style="BACKGROUND: #ffffff; OVERFLOW: hidden; WIDTH: 995px; COLOR: #ffffff">
<TABLE cellPadding=0 align=center border=0 cellspace="0">
<TBODY>
<TR>
<TD id=demo1 style="COLOR: #000" vAlign=top>
插入表格
</TD>
<TD id=demo2 vAlign=top>
插入表格
</TD></TR></TBODY></TABLE>
<SCRIPT>
             
var speed=30
             demo2.innerHTML
=demo1.innerHTML
             
function Marquee(){
             
if(demo2.offsetWidth-demo.scrollLeft<=0)
             demo.scrollLeft
-=demo1.offsetWidth
             
else{
             demo.scrollLeft
++
             }
             }
             
var MyMar=setInterval(Marquee,speed)
             demo.onmouseover
=function() {clearInterval(MyMar)}
             demo.onmouseout
=function() {MyMar=setInterval(Marquee,speed)}
</SCRIPT>
</DIV><!--图片滚动代码结束-->

你可能感兴趣的:(代码)