日期:2014-05-17  浏览次数:20883 次

为什么我这些图片只能滚动一次?不能无限滚动那位大侠说说。。。
<div id=demo style="OVERFLOW: hidden; WIDTH: 760px; align: center">
  <table cellspacing="0" cellpadding="0" align="center" border="0">
  <tbody>
  <tr>
  <td id="marquePic1" valign="top">

<table width="740" height="142" border="0" cellpadding="0" cellspacing="0">
  <tr>
  <td width="95" height="110" align="center"><img src="images/yongjie_40.gif"></td>
  <td width="95" align="center"><img src="images/yongjie_43.gif"></td>
  <td width="95" align="center"><img src="images/yongjie_45.gif"></td>
  <td width="95" align="center"><img src="images/yongjie_43.gif"></td>
  <td width="95" align="center"><img src="images/yongjie_45.gif"></td>
  </tr>  
</table>
</td>
  <td id="marquePic2" valign="top"></td>
  </tr>
  </tbody>
  </table>
</div>
<script type=text/javascript> 
var speed=30 
marquePic2.innerHTML=marquePic1.innerHTML 
function Marquee(){ 
if(demo.scrollLeft>=marquePic1.scrollWidth){ 
demo.scrollLeft=0 
}else{ 
demo.scrollLeft++ 
}} 
var MyMar=setInterval(Marquee,speed) 
demo.onmouseover=function() {clearInterval(MyMar)} 
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} 
</script>

------解决方案--------------------
图片要多放一些,超过显示的长度。