<!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>无标题文档</title> <script type="text/javascript"> var maq;//整个框 var m1; var m2; var speed=60;//速度 var timer; window.οnlοad=function(){ maq=document.getElementById("maq"); m1=document.getElementById("m1"); m2=document.getElementById("m2"); m2.innerHTML=m1.innerHTML; timer=window.setInterval(run,speed); maq.οnmοusemοve=function(){ window.clearInterval(timer); maq.οnmοuseοut=function(){ timer=window.setInterval(run,speed); } } function run(){ if(m2.offsetWidth<=maq.scrollLeft){ maq.scrollLeft-=m2.offsetWidth; }else{ maq.scrollLeft+=6;//从右边往左边滚 } } } </script>
</head>
<body> <div id="maq" style=" overflow:hidden; width:490px; height:500px; float:botton;"> <table> <tr> <td id="m1"> <table> <tr> <td><a href="3.jpg" target="_blank" ><img src="images/x_03.jpg" /></a></td> <td><a href="3.jpg" target="_blank"><img src="images/x_07.jpg" /></a></td> <td><a href="3.jpg" target="_blank"><img src="images/x_14.jpg" /></a></td> </tr> </table> </td><td id="m2"></td> </tr> </table> </div>
</body> </html>
跑马灯见疗效
最新推荐文章于 2024-01-17 17:20:20 发布