asp.net图片滚动+JAVASCRIPT(向右)

 

 1  
 2 < title > 图片连续循环滚动代码(向上) - Flywe の Blog </ title >
 3 < base 
 4
 5 href ="http://image2.sina.com.cn/gm/lineage2/whz/newwh/images/fy/images/images/ifimage/" >  
 6
 7
 8
 9 <!-- 图片滚动代码开始 -->
10 < div  id =demo  style ="BACKGROUND: #ffffff; OVERFLOW: hidden; WIDTH: 310px; COLOR: #ffffff; HEIGHT: 110px" >
11 < table  cellPadding =0  align =center  border =0  cellspace ="0" >
12 < tr >
13    < td  id =demo1  vAlign =top >
14    < img  src ="gfjs.gif" >< img  src ="bxtt.gif" >< img  src ="bzjd.gif" >  
15 < img  src ="gfjs.gif" >< img  src ="bxtt.gif" >< img  src ="bzjd.gif" >
16 < img  src ="gfjs.gif" >< img  src ="bxtt.gif" >< img  src ="bzjd.gif" >
17 < img  src ="gfjs.gif" >< img  src ="bxtt.gif" >< img  src ="bzjd.gif" >
18 < img  src ="gfjs.gif" >< img  src ="bxtt.gif" >< img  src ="bzjd.gif" >
19 < img  src ="gfjs.gif" >< img  src ="bxtt.gif" >< img  src ="bzjd.gif" >
20 < img  src ="gfjs.gif" >< img  src ="bxtt.gif" >< img  src ="bzjd.gif" >
21 < img  src ="gfjs.gif" >< img  src ="bxtt.gif" >< img  src ="bzjd.gif" >
22 < img  src ="gfjs.gif" >< img  src ="bxtt.gif" >< img  src ="bzjd.gif" >
23 < img  src ="gfjs.gif" >< img  src ="bxtt.gif" >< img  src ="bzjd.gif" >
24 < img  src ="gfjs.gif" >< img  src ="bxtt.gif" >< img  src ="bzjd.gif" >
25    </ td >
26    < td  id =demo2  vAlign =top >
27    </ td >
28 </ tr >
29 </ table >
30 < SCRIPT >
31             var speed=30;
32             demo2.innerHTML=demo1.innerHTML;
33             function Marquee(){
34             if(demo2.offsetWidth-demo.scrollLeft<=0)
35             demo.scrollLeft-=demo1.offsetWidth;
36             else{
37             demo.scrollLeft++;
38             }

39             }

40             var MyMar=setInterval(Marquee,speed);
41             demo.onmouseover=function() {clearInterval(MyMar);}
42             demo.onmouseout=function() {MyMar=setInterval(Marquee,speed);}
43
</ SCRIPT >  
44 </ div >
45 <!-- 图片滚动代码结束 -->
46

你可能感兴趣的:(JavaScript)