zoukankan      html  css  js  c++  java
  • Javascript Marquee

    <table width="847" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td height="148" align="center" valign="top" style="background-image:url(images/bant.gif)">
    <div id="demo" style="OVERFLOW: hidden; WIDTH: 843px; COLOR: #ffffff; HEIGHT: 142px">
    <table width="342" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td id="demo1" valign="top">
    <table border="0" cellpadding="7" cellspacing="1">
    <tr>
    <td><img src="images/gd/g1.gif" width="100" height="137" border="0" /></td>
    <td><img src="images/gd/g2.gif" width="100" height="137" border="0" /></td>
    <td><img src="images/gd/g3.gif" width="100" height="137" border="0" /></td>
    <td><img src="images/gd/g4.gif" width="100" height="137" border="0" /></td>
    <td><img src="images/gd/g5.gif" width="100" height="140" border="0" /></td>
    <td><img src="images/gd/g6.gif" width="100" height="140" border="0" /></td>
    <td><img src="images/gd/g7.gif" width="100" height="140" border="0" /></td>
    <td><img src="images/gd/g8.gif" width="100" height="140" border="0" /></td>
    </tr>
    </table>
    </td>
    <td id="demo2" valign="top">&nbsp;</td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    </table>
    <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>
    
    
  • 相关阅读:
    web 学习资源整理
    CodeSmith 学习资料收集
    常用 T_SQL 语句
    SQL Server 2000查询分析器自定义查询快捷键
    插入标识列 identity_insert
    c# 上传FTP文件
    (.Net 3.5Sp1)WebForm使用System.Web.Routing
    SPQuery.ViewAttributes
    ChatterBot之linux下安装mongodb 02
    linux端口开放指定端口的两种方法
  • 原文地址:https://www.cnblogs.com/Aricc/p/1340345.html
Copyright © 2011-2022 走看看