横向滚动的图片代码

类别:网站制作 点击:0 评论:0 推荐:

<html>
<head>

<title>无标题文档</title>
</head>
 
<body>
<DIV id=demo style="OVERFLOW: hidden; WIDTH: 350px; HEIGHT: 300px">
            <TABLE cellSpacing=0 cellPadding=0 border=0>

              <TBODY>
              <TR>
                <TD id=demo1>
                  <TABLE cellSpacing=0 cellPadding=5>
                    <TBODY>
                    <TR>
                   <TD vAlign=center align=middle><img src="&#31227;&#21160;&#22270;&#29255;/aa.gif" width="330" height="260">fsdgasgasg</TD>
                      <TD vAlign=center align=middle><A
                        href="gsghttp://ads.gd.sohu.com/customers/tclmobile/flower/index1.html">gsg</A></TD>
                      <TD vAlign=center align=middle><A
                        href="gsghttp://www.tclmobile.com.cn/mobile/product.jsp?catid=59">gsg</A></TD>
                      <TD vAlign=center align=middle><A
                        href="http://www.tclmobile.com.cn/mobile/product.jsp?catid=78&amp;id=343"><IMG
                        src="030708htmltable02.gif????????_files/i919_demo.gif"
                    border=0></A></TD>
                    </TR></TBODY></TABLE></TD>
                <TD id=demo2></TD></TR></TBODY></TABLE></DIV>
<SCRIPT>

var speed=20

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>

</body>
</html>

本文地址:http://com.8s8s.com/it/it31174.htm