滚动图片


          
           <table width="450px" border=0 cellpadding=0 cellspacing=0>                                                                                        

                
 <tr><td>                                                                                                                                                    

                                   
  <div id=www_qpsh_com style=overflow:hidden;height:120px;width:450px;color:#ff0000><table align=left cellpadding=0 cellspace=0 border=0><tr><td

id=www_qpsh_com1 valign=top>
  <table border=0 cellpadding=0 cellspacing=0>
  <tr><td><a href=http://www.qpsh.com/javascript/showpage2443.htm target=_blank><img border=0 src="http://www.qpsh.com/icon/BS9097.jpg" width=150 height=100

hspace=2></a><br><center>说明一</center></td>
  <td width=30></td>
  <td><a href=http://www.qpsh.com target=_blank><img border=0 src="http://www.qpsh.com/icon/BS9092.jpg" width=150 height=100  hspace=2></a><br><center>说明二

</center></td></td>
  <td width=30></td>
  <td><a href=http://www.3sdo.cn target=_blank><img border=0 src="http://www.qpsh.com/icon/BS9084.jpg" width=150 height=100  hspace=2></a><br><center>说明三

</center></td>
  <td><a href=http://www.sanguo5.com target=_blank><img border=0 src="http://www.qpsh.com/icon/BS9079.jpg" width=150 height=100  hspace=2></a><br><center>说

明四</center></td>
  <td width=30></td>
  <td><a href=http://www.pc555.com target=_blank><img border=0 src="http://www.qpsh.com/icon/BS9070.jpg" width=150 height=100  hspace=2></a><br><center>说明

五</center></td>
  </tr>
  </table>
 </td><td id=www_qpsh_com2 valign=top></td></tr></table></div>
  <script>
  var speed=10//速度数值越大速度越慢
  www_qpsh_com2.innerHTML=www_qpsh_com1.innerHTML
  function Marquee(){
  if(www_qpsh_com2.offsetWidth-www_qpsh_com.scrollLeft<=0)
  www_qpsh_com.scrollLeft-=www_qpsh_com1.offsetWidth
  else{
  www_qpsh_com.scrollLeft++
  }
  }
  var MyMar=setInterval(Marquee,speed)
  www_qpsh_com.onmouseover=function() {clearInterval(MyMar)}
  www_qpsh_com.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
  </script>
 </td></tr>                                                                                                                                                  

                                                                        
 </table>

你可能感兴趣的:(JavaScript)