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

原创 2016年06月02日 12:50:46
 

                              <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>

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

HTML,用表格单元格放置图片 <img>,</td><td>之间的回车会使得图像之间有空隙

毕业设计终于做完了,但是

html简单图片轮播的实现

这里的图片轮播方法是我从网上参考的方法,只是自己做了一些改进 先来贴一发代码 ...

[前端]JavaScript图片切换

最近学前端感觉入门了,还在最最基础的阶段。今天打开一个网页看到非常常见的一个图片切换效果.
  • napoay
  • napoay
  • 2015-10-12 22:37
  • 1008

Jquery实现动态切换图片的方法

Jquery实现动态切换图片的方法 作者:永远爱好写程序 字体:[增加 减小] 类型:转载 这篇文章主要介绍了Jquery实现动态切换图片的方法,涉及jQuery页面元素操作及链式...

javascript图片连续无间隙水平向左滚动,无间隙水平向右滚动,符合W3C Web标准

javascript图片连续无间隙水平向左滚动,无间隙水平向右滚动,符合W3C Web标准 很久以前就有这个问题,总是找不到通用的,或比较简单的“图片连续无间隙向左滚动,无间隙向右滚动,符合...

JS图片不间断滚动代码(向上,向下,向左,向右)

JS不间断向左滚动 http://www.makewing.com/lanren/jscode/js-0063/images/01.jpg"> src="http://www.makewing.com...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)