关闭

图片向左流动,放上鼠标,切换图片

65人阅读 评论(0) 收藏 举报
分类:
 

                              <DIV id=demo
                              style="OVERFLOW: hidden; WIDTH: 943px; HEIGHT: 170px"
                              color:#f0f0ef;border:0>
                              <TABLE cellSpacing=0 cellPadding=0 width="100%"
                              align=left border=0>
                                <TBODY>
                                <TR>
                                <TD id=demo1 vAlign=top width="100%">
                                <TABLE cellSpacing=0 cellPadding=0 width="100%"
                                border=0>
                                <TBODY>
                                <TR vAlign=top align=middle>
                                <TD align=middle><A
                                href="#"><IMG
                                onmouseover=" javascript:this.src='images/11.jpg';"
                                onmouseout=" javascript:this.src='images/01.jpg';"
                                height=170
                                src="images/01.jpg"
                                border=0></A></TD>
                                <TD width=5></TD>
                                <TD align=middle><A
                                href="#"><IMG
                                onmouseover=" javascript:this.src='images/12.jpg';"
                                onmouseout=" javascript:this.src='images/02.jpg';"
                                height=170
                                src="images/02.jpg"
                                border=0></A></TD>
                                <TD width=5></TD>
                                <TD align=middle><A
                                href="#"><IMG
                                onmouseover=" javascript:this.src='images/13.jpg';"
                                onmouseout=" javascript:this.src='images/03.jpg';"
                                height=170
                                src="images/03.jpg"
                                border=0></A></TD>
                                <TD width=5></TD>
                                <TD align=middle><A
                                href="#"><IMG
                                onmouseover=" javascript:this.src='images/14.jpg';"
                                onmouseout=" javascript:this.src='images/04.jpg';"
                                height=170
                                src="images/04.jpg"
                                border=0></A></TD>
                                <TD width=5></TD>
                                <TD align=middle><A
                                href="#"><IMG
                                onmouseover=" javascript:this.src='images/15.jpg';"
                                onmouseout=" javascript:this.src='images/05.jpg';"
                                height=170
                                src="images/05.jpg"
                                border=0></A></TD>
                                <TD width=5></TD></TR></TBODY></TABLE></TD>
                                <TD id=demo2
                              width=1></TD></TR></TBODY></TABLE></DIV>
                              <SCRIPT language=javascript>
 var speed=15//速度数值越大速度越慢
 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>

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:352312次
    • 积分:4325
    • 等级:
    • 排名:第7010名
    • 原创:775篇
    • 转载:136篇
    • 译文:1篇
    • 评论:20条
    最新评论