岁月留声QtAsp

Qt in Linux , Asp Asp.net Jsp Php in Web

« 向Google、Yahoo!、MSN、Ask和百度提交sitemap 用div限制页面内容高度,超过高度用滚动条控制 »

支持IE6,IE7,firefox图片滚动好使的代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>支持IE6,IE7,firefox图片滚动好使的代码</title>
</head>
<body>
<!---- 滚动代码图片开始 ---->
<div id="demo" style="OVERFLOW: hidden; WIDTH: 720px; HEIGHT: 150px">
  <table cellSpacing="0" cellPadding="0" align="left" border="0">
    <tbody>
      <tr>
        <td id="demo1">
          <table id="Pic_List" style="100%; BORDER-COLLAPSE: collapse" cellSpacing="0" cellPadding="1" border="0">
            <tbody>
              <tr>
                <TD>
                  <DIV align=center><A
                  href="http://www.bipt.edu.cn/web/xinxi/jpkc/xszpzs/pic3.htm"><IMG
                  height=94 src="接口技术.files/20090121161116773298.jpg" width=142
                  border=0></A></DIV></TD>
                                  <TD>
                  <DIV align=center><A
                  href="http://www.bipt.edu.cn/web/xinxi/jpkc/xszpzs/pic3.htm"><IMG
                  height=94 src="接口技术.files/20090121161116773298.jpg" width=142
                  border=0></A></DIV></TD>
                                  <TD>
                  <DIV align=center><A
                  href="http://www.bipt.edu.cn/web/xinxi/jpkc/xszpzs/pic3.htm"><IMG
                  height=94 src="接口技术.files/20090121161116773298.jpg" width=142
                  border=0></A></DIV></TD>
                                  <TD>
                  <DIV align=center><A
                  href="http://www.bipt.edu.cn/web/xinxi/jpkc/xszpzs/pic3.htm"><IMG
                  height=94 src="接口技术.files/20090121161116773298.jpg" width=142
                  border=0></A></DIV></TD>
              </tr>
            </tbody>
          </table>
        </td>
        <td id="demo2" vAlign="top"></td>
      </tr>
    </tbody>
  </table>
</div>
<script>
var demo=document.getElementById("demo")
var demo1=document.getElementById("demo1")
var demo2=document.getElementById("demo2")
var Picspeed=40
demo2.innerHTML=demo1.innerHTML
function Marquee1(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee1,Picspeed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee1,Picspeed)}
  </script>
<!---- 滚动代码图片结束 ---->
</body>
</html>

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

Search

  •  

最新评论及回复

最近发表

Powered By Z-Blog 1.8 Spirit Build 80722 Code detection by Codefense

Copyright 2008-2011 京公网安备 110115000655 京ICP备09005635号 www.qtasp.cn WebSite. All Rights Reserved.