几张图片水平循环滚动的代码

网站建设

<style type="text/css">
td#marquePic1 img{ width:104px; height:84px;}
</style>
      <TABLE border=0 cellSpacing=0 cellPadding=0 width="100%" align=center style="background-color:#0f0">
        <TBODY>
        <TR>
          <TD>
            <DIV
            style="MARGIN-TOP: 6px; WIDTH: 926px; OVERFLOW: hidden; align: center"
            id=demo><!–相关媒体–>
            <TABLE border=0 cellSpacing=0 cellPadding=0 width="100%" align=center style="background-color:#f00">
              <TBODY>
              <TR>
                <TD id=marquePic1><A title=槟榔><IMG alt=槟榔 src="T_files/200811128235槟榔.jpg"></A><A title=番石榴><IMG alt=番石榴 src="T_files/2008111282431番石榴.jpg"></A><A title=哈密瓜><IMG alt=哈密瓜 src="T_files/2008111282447哈密瓜.jpg"></A><A title=黄帝椒><IMG alt=黄帝椒 src="T_files/200811128258黄帝椒.jpg"></A><A title=莲雾><IMG alt=莲雾 src="T_files/2008111282529莲雾.jpg"></A><A title=木瓜 ><IMG alt=木瓜 src="T_files/2008111282544木瓜.jpg"></A><A title=琼中绿橙 ><IMG alt=琼中绿橙 src="T_files/2008111282614琼中绿橙.jpg"></A><A title=热带兰花><IMG alt=热带兰花 src="T_files/2008111282927热带兰花.jpg"></A><A title=圣女果 ><IMG alt=圣女果 src="T_files/2008111282944圣女果.jpg"></A><A title=文昌鸡 ><IMG alt=文昌鸡 src="T_files/200811128300文昌鸡.jpg"></A><A title=无核荔枝 ><IMG alt=无核荔枝 src="T_files/2008111283013无核荔枝.jpg"></A><A title=西瓜 ><IMG alt=西瓜 src="T_files/2008111283030西瓜.jpg"></A><A title=香蕉 ><IMG alt=香蕉 src="T_files/2008111283041香蕉.jpg"></A><A title=珍珠柚 ><IMG alt=珍珠柚 src="T_files/200811128319珍珠柚1.jpg"></A><A title=火鹤花 ><IMG alt=火鹤花 src="T_files/20081112104853火鹤花.jpg"></A></TD>
                <TD id=marquePic2 vAlign=top></TD></TR></TBODY></TABLE></DIV>
            <SCRIPT type=text/javascript>
var speed=30
marquePic2.innerHTML=marquePic1.innerHTML
function Marquee(){
if(demo.scrollLeft>=marquePic1.scrollWidth){
demo.scrollLeft=0
}else{
demo.scrollLeft++
}}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</SCRIPT>
</TD></TR>
        </TBODY></TABLE>

继续阅读