如题,效果跟各大门户网站的滚动新闻图片类似,即带有链接的那种。不知道自己讲清楚了没。。

解决方案 »

  1.   

    把tab ID放到一个数组中,每隔一段时间把当前tab的下一个tab(相对数组下标来说)激活
      

  2.   

    这个代码?
    <!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>图片滚动</title>
    </head><body><table width=700 border=0 cellpadding=0 cellspacing=0>
    <tr>
    <td><div id=W3C style=overflow:hidden;height:120px;width:700px;color:#ff0000>
    <table align=left cellpadding=0 cellspace=0 border=0>
    <tr>
    <td id=W3C1 valign=top> <table border=0 cellpadding=0 cellspacing=0>
    <tr><td>
    <a href=http://www.xxx.com target=_blank>
    <img border=0 src="http://www.xxx.com/icon/BS9097.jpg" width=150 height=100 hspace=22>
    </a>
    <br>
    <center><b>说明一</b></center>
    </td><td width=30></td><td>
    <a href=http://www.xxx.com target=_blank>
    <img border=0 src="http://www.xxx.com/icon/BS9092.jpg" width=150 height=100  hspace=22>
    </a>
    <br>
    <center><b>说明二</b></center>
    </td><td width=30></td><td>
    <a href=http://www.xxx.org target=_blank>
    <img border=0 src="http://www.xxx.com/icon/BS9084.jpg" width=150 height=100  hspace=22>
    </a>
    <br>
    <center><b>说明三</b></center>
    </td><td>
    <a href=http://www.xxx.com target=_blank>
    <img border=0 src="http://www.xxx.com/icon/BS9079.jpg" width=150 height=100  hspace=22>
    </a>
    <br>
    <center><b>说明四</b></center>
    </td><td width=30></td><td>
    <a href=http://www.xxx.com target=_blank>
    <img border=0 src="http://www.xxx.com/icon/BS9070.jpg" width=150 height=100  hspace=22>
    </a>
    <br>
    <center><b>说明五</b></center>
    </td> </tr>
    </table> </td><td id=W3C2 valign=top></td>

    </tr>
    </table>
    </div><script>
    var speed=10//速度数值越大速度越慢W3C2.innerHTML=W3C1.innerHTMLfunction Marquee()
    {
    if(W3C2.offsetWidth-W3C.scrollLeft<=0)
    W3C.scrollLeft-=W3C1.offsetWidth
    else
    {
    W3C.scrollLeft++
    }
    }var MyMar=setInterval(Marquee,speed)
    W3C.onmouseover=function() {clearInterval(MyMar)}
    W3C.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
    </script>   </td>
    </tr>                                                                                  
    </table>
    </body>
    </html>