不间断滚动
<!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=utf-8" /> <title>图片不间断向左滚动JS代码</title> <style> #demo{width:728px; overflow:hidden; margin:0px auto}</style> </head> <body> <div id="demo"> <table border=0 align=center cellpadding=1 cellspacing=1 cellspace=0 > <tr><td valign=top bgcolor=ffffff id=marquePic1> <table width='100%' border='0' cellspacing='0'><tr> <td align=center><a href='http://www.16sucai.com'><img src="images/01.jpg" width=232 height=139 border=0><br><br>01</a></td> <td align=center><a href='http://www.16sucai.com'><img src="images/02.jpg" width=232 height=139 border=0><br><br>02</a></td> <td align=center><a href='http://www.16sucai.com'><img src="images/03.jpg" width=232 height=139 border=0><br><br>03</a></td> <td align=center><a href='http://www.16sucai.com'><img src="images/04.jpg" width=232 height=139 border=0><br><br>04</a></td> <td align=center><a href='http://www.16sucai.com'><img src="images/05.jpg" width=232 height=139 border=0><br><br>05</a></td> </tr></table> </td><td id=marquePic2 valign=top></td></tr> </table></div> <div style="height:90px; width:728px; padding-top:10px; margin:0px auto;"> <script type="text/javascript"><!-- google_ad_client = "ca-pub-6110696270771103"; /* 全站大横幅 */ google_ad_slot = "4968847295"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <script type="text/javascript"> var speed=50 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> </body> </html>