<!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=gb2312" /> <meta name="keywords" content="JS代码,图片特效,JS广告代码,JS特效代码" /> <meta name="description" content="此代码内容为腾讯6图切换JS代码,属于站长常用代码,更多图片特效代码请访问懒人图库JS代码频道。" /> <title>腾讯6图切换JS代码_懒人图库</title> <LINK rel=stylesheet type=text/css href="css/style.css" media=screen> </head><body> <center> <DIV id=swap_pic> <DIV id=prev class=scroll>PREV</DIV> <DIV class=box> <UL style="LEFT: 0px" id=pics class=pics> <LI> <P><A href="http://www.lanrentuku.com/" target=_blank><IMG alt="" src="images/lol.jpg"><SPAN>英雄联盟不删档官网</SPAN></A></P> <P><A href="http://www.nifengla.com/" target=_blank><IMG alt="" src="images/dsz.jpg"><SPAN>你疯啦官方网站</SPAN></A></P> <P><A href="http://www.lanrentuku.com/" target=_blank><IMG alt="" src="images/c9.jpg"><SPAN>第九大陆官网</SPAN></A></P></LI> <LI> <P><A href="http://www.lanrentuku.com/" target=_blank><IMG alt="" src="images/lrtk.jpg"><SPAN>懒人图库 搜集整理</SPAN></A></P> <P><A href="http://www.lanrentuku.com/" target=_blank><IMG alt="" src="images/speed1.jpg"><SPAN>QQ飞车官网</SPAN></A></P> <P><A href="http://www.maitianquan.com/" target=_blank><IMG alt="" src="images/qqxy.jpg"><SPAN>麦田圈官方网站</SPAN></A></P></LI></UL></DIV> <DIV id=next class=scroll>NEXT</DIV> </DIV> </center> <SCRIPT type=text/javascript> (function(){ var vari={ width:960, pics:document.getElementById("pics"), prev:document.getElementById("prev"), next:document.getElementById("next"), len:document.getElementById("pics").getElementsByTagName("li").length, intro:document.getElementById("pics").getElementsByTagName("p"), now:1, step:5, dir:null, span:null, span2:null, begin:null, begin2:null, end2:null, move:function(){ if(parseInt(vari.pics.style.left,10)>vari.dir*vari.now*vari.width&&vari.dir==-1){ vari.step=(vari.step<2)?1:(parseInt(vari.pics.style.left,10)-vari.dir*vari.now*vari.width)/5; vari.pics.style.left=parseInt(vari.pics.style.left,10)+vari.dir*vari.step+"px"; } else if(parseInt(vari.pics.style.left,10)<-vari.dir*(vari.now-2)*vari.width&&vari.dir==1){ vari.step=(vari.step<2)?1:(-vari.dir*(vari.now-2)*vari.width-parseInt(vari.pics.style.left,10))/5; vari.pics.style.left=parseInt(vari.pics.style.left,10)+vari.dir*vari.step+"px"; } else{ vari.now=vari.now-vari.dir; clearInterval(vari.begin); vari.begin=null; vari.step=5; vari.width=960; } }, scr:function(){ if(parseInt(vari.span.style.top,10)>-31){ vari.span.style.top=parseInt(vari.span.style.top,10)-5+"px"; } else{ clearInterval(vari.begin2); vari.begin2=null; } }, stp:function(){ if(parseInt(vari.span2.style.top,10)<0){ vari.span2.style.top=parseInt(vari.span2.style.top,10)+10+"px"; } else{ clearInterval(vari.end2); vari.end2=null; } } }; vari.prev.onclick=function(){ if(!vari.begin&&vari.now!=1){ vari.dir=1; vari.begin=setInterval(vari.move,20); } else if(!vari.begin&&vari.now==1){ vari.dir=-1 vari.width*=vari.len-1; vari.begin=setInterval(vari.move,20); }; }; vari.next.onclick=function(){ if(!vari.begin&&vari.now!=vari.len){ vari.dir=-1; vari.begin=setInterval(vari.move,20); } else if(!vari.begin&&vari.now==vari.len){ vari.dir=1 vari.width*=vari.len-1; vari.begin=setInterval(vari.move,20); }; }; for(var i=0;i<vari.intro.length;i++){ vari.intro[i].onmouseover=function(){ vari.span=this.getElementsByTagName("span")[0]; vari.span.style.top=0+"px"; if(vari.begin2){clearInterval(vari.begin2);} vari.begin2=setInterval(vari.scr,20); }; vari.intro[i].onmouseout=function(){ vari.span2=this.getElementsByTagName("span")[0]; if(vari.begin2){clearInterval(vari.begin2);} if(vari.end2){clearInterval(vari.end2);} vari.end2=setInterval(vari.stp,5); }; } })(); </SCRIPT> </body> </html>
|