zoukankan      html  css  js  c++  java
  • 连续滚动图片代码

    <div id="www_qpsh_com" style="overflow:hidden;height:285px;1000px;color:#ff0000">
    <table border="0" align="left" cellpadding="0" cellspacing="0" cellspace="0">
    <tr>
    <td id="www_qpsh_com1" valign="top"><table border="0" align="center" cellspacing="0" cellpadding="0">
    <tr>

    <td style="padding-left:1px;"><img src="图片1" alt="" width="115" height="285" border="0" /></td>
    <td style="padding-left:1px;"><img src="图片1" alt="" width="115" height="285" border="0" /></td>
    <td style="padding-left:1px;"><img src="图片1" alt="" width="115" height="285" border="0" /></td>
    <td style="padding-left:1px;"><img src="图片1" alt="" width="115" height="285" border="0" /></td>
    <td style="padding-left:1px;"><img src="图片1" alt="" width="115" height="285" border="0" /></td>
    <td style="padding-left:1px;"><img src="图片1" alt="" width="115" height="285" border="0" /></td>
    <td style="padding-left:1px;"><img src="图片1" alt="" width="115" height="285" border="0" /></td>
    <td style="padding-left:1px;"><img src="图片1" alt="" width="115" height="285" border="0" /></td>
    <td style="padding-left:1px;"><img src="图片1" alt="" width="115" height="285" border="0" /></td>
    <td style="padding-left:1px;"><img src="图片1" alt="" width="115" height="285" border="0" /></td>
    </tr>
    </table></td>
    <td id="www_qpsh_com2" valign="top"></td>
    </tr>
    </table>
    </div>

    <SCRIPT>
    var speed3=25;//速度数值越大速度越慢
    var www_qpsh_com1 = document.getElementById("www_qpsh_com1"); //非w3c标准要找到表单,必须是要用getElementById("XX");
    var www_qpsh_com2 = document.getElementById("www_qpsh_com2");
    var www_qpsh_com = document.getElementById("www_qpsh_com");
    www_qpsh_com2.innerHTML=www_qpsh_com1.innerHTML;

    function Marquee3(){
    if(www_qpsh_com2.offsetWidth-www_qpsh_com.scrollLeft<=0)
    www_qpsh_com.scrollLeft-=www_qpsh_com1.offsetWidth;
    else{
    www_qpsh_com.scrollLeft++;
    }
    }
    var MyMar3=setInterval(Marquee3,speed3)
    www_qpsh_com.onmouseover=function() {clearInterval(MyMar3)}
    www_qpsh_com.onmouseout=function() {MyMar3=setInterval(Marquee3,speed3)}
    </SCRIPT>
  • 相关阅读:
    url中特殊字符被转义成编码后如何处理
    解决:扰人的报错 Input length must be multiple of 8 when decrypting with padded cipher
    使用fastjson 进行jsonObject转实体类对象
    Mybatis之foreach遍历Map
    Map对象中的keyset()、entryset()和Map.Entry
    jdk的keytool生成jks和获取jks的信息,公匙
    postgres如何不插入重复的值
    docker查看日志记录
    Git Bash输错账号密码如何重新输入
    IntellIJ IDEA 配置 Maven 以及 修改 默认 Repository
  • 原文地址:https://www.cnblogs.com/juan/p/1452581.html
Copyright © 2011-2022 走看看