点击(此处)折叠或打开
- <div id=\"marquee_demo\" style=\"overflow:hidden;width:500px;text-align:center;border:1px solid #ccc\">
- <table cellspacing=\"0\" cellpadding=\"3\" align=\"center\" border=\"0\">
- <tr>
- <td id=\"marquee_product1\" valign=\"top\">
- <table width=\"800\" height=\"100\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
- <tr>
- <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">1</td>
- <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">2</td>
- <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">3</td>
- <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">4</td>
- <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">5</td>
- <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">6</td>
- <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">7</td>
- <td width=\"180\" align=\"center\" style=\"padding:3px 15px 3px 15px;\">8</td>
- </tr>
- </table>
- </td>
- <td id=\"marquee_product2\" valign=\"top\"></td>
- </tr>
- </table>
- </div>
- <script type=\"text/javascript\">
- var speed=30;
- marquee_product2.innerHTML=marquee_product1.innerHTML;
- function Marquee(){
- if(marquee_demo.scrollLeft>=marquee_product1.scrollWidth){
- marquee_demo.scrollLeft=0;
- }
- else{
- marquee_demo.scrollLeft++;
- }
- }
- var MyMar=setInterval(Marquee,speed);
- marquee_demo.onmouseover=function(){clearInterval(MyMar);}
- marquee_demo.onmouseout=function(){MyMar=setInterval(Marquee,speed www.zqzqjd.com );}
- </script>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29737856/viewspace-1302670/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29737856/viewspace-1302670/