1 <!DOCTYPE html> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <title></title> 6 <style> 7 8 9 10 </style> 11 </head> 12 <body> 13 <div id="feng" style="overflow: hidden;height:210px;210px; border:0px solid #dde5bc;"> 14 <div id=feng1> 15 <ul class="topimg1"> 16 <li><a href='/html/fengcaizhanshi/2009/1017/717.html'><img src='1.jpg' border='0' ></a><br />网页图片上下滚动代码</li> 17 <li><a href='/html/fengcaizhanshi/2009/1017/717.html'><img src='1.jpg' border='0' ></a><br />网页图片上下滚动代码</li> 18 <li><a href='/html/fengcaizhanshi/2009/1017/717.html'><img src='1.jpg' border='0' ></a><br />网页图片上下滚动代码</li> 19 <li><a href='/html/fengcaizhanshi/2009/1017/717.html'><img src='1.jpg' border='0' ></a><br />网页图片上下滚动代码</li> 20 <li><a href='/html/fengcaizhanshi/2009/1017/717.html'><img src='1.jpg' border='0' ></a><br />网页图片上下滚动代码</li> 21 </ul> 22 </div> 23 <div id=feng2></div> 24 </div> 25 <script> 26 var speed=50 27 var feng=document.getElementById("feng"); 28 var feng2=document.getElementById("feng2"); 29 var feng1=document.getElementById("feng1"); 30 feng2.innerHTML=feng1.innerHTML 31 function Marquee(){ 32 if(feng2.offsetTop-feng.scrollTop<=0) 33 feng.scrollTop-=feng1.offsetHeight 34 else{ 35 feng.scrollTop++ 36 } 37 } 38 var MyMar=setInterval(Marquee,speed) 39 feng.onmouseover=function() {clearInterval(MyMar)} 40 feng.onmouseout=function() {MyMar=setInterval(Marquee,speed)} 41 </script> 42 </body> 43 </html>