日期:2014-05-18  浏览次数:20485 次

图片循环滚动两次停止,请大家帮忙,谢谢!
图片循环滚动两次停止,网上找了很多帖子,也未解决,非常着急,请帮忙,谢谢!

<table border="0" align="center" cellpadding="0" cellspacing="0" width="751" height="148">
  <tr>
  <td style=" width:1px"></td>
  <td style="background-image:url(images/u3.jpg);width:751px; height:140px"; align="center">
  <table>
  <tr>
  <td style="width:20px"></td>
  <td>
  <div id="demo" style="OVERFLOW: hidden; WIDTH: 98%; COLOR: #ffffff">
  <table border="0" align="left" cellpadding="0" cellspacing="0">
  <tbody>
  <tr>
   
  <td id="demo1" valign="center"><table height="142" border="0" cellpadding="0" cellspacing="0" width="98%">
  <tr>
  <td style="width:171px"></td>
   
  <td><img src="website/UploadFile/tu1.jpg" border="0" alt=""/></td>
<td width="30px">&nbsp;</td>
<td><img src="website/UploadFile/tu2.jpg" border="0"alt=""/></td>
<td width="30px">&nbsp;</td>
<td><img src="website/UploadFile/tu3.jpg" border="0" alt=""/></td>
<td width="30px">&nbsp;</td>
<td><img src="website/UploadFile/tu5.jpg" border="0" alt=""/></td>
<td width="30px">&nbsp;</td>
<td><img src="website/UploadFile/tu6.jpg" border="0" alt=""/></td>
<td width="30px">&nbsp;</td>

  </tr>
  </table></td>
  <td id="demo2" vAlign=top>&nbsp;</td></tr></tbody></table> </div>
  <!--</marquee>-->


<script type="text/javascript">
var speed3=25
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed3)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed3)}
</script>
</td>
</tr>
</table>
</td>

</tr>
</table>

------解决方案--------------------
HTML code
<!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> 
<title>pic player</title> 
<script type="text/javascript" src="http://img.jb51.net/jslib/jquery/jquery-1.2.6.js"></script> 
<script