Foreground code:
Copy Code code as follows:
<div class= "Sub_box" >
<div id= "P-select" class= "Sub_nav" >
<div class= "Sub_no" id= "BD1LFSJ" >
<ul>
<li class= "Show" >1</li>
<li class= "" >2</li>
<li class= "" >3</li>
<li class= "" >4</li>
<li class= "" >5</li>
<li class= "" >6</li>
<li class= "" >7</li>
</ul>
</div>
</div>
<div id= "Bd1lfimg" >
<div>
<DL class= "Show" >
</dl>
<asp:repeater id= "reptoppicture" runat= "Server" >
<ItemTemplate>
<DL class= "" >
<dt><a href= "" >
'/></a></dt>
</dl>
</ItemTemplate>
</asp:Repeater>
</div>
</div>
</div>
<script type= "Text/javascript" > Movec ();</script>
JavaScript code:
Copy Code code as follows:
Selector
function $a (id,tag) {var re= (id&&typeof id!= "string")? Id:document.getElementById (ID); if (!tag) {return re;} Else{return re.getelementsbytagname (tag);}
Focus scrolling Map Click to move
function Movec ()
{
var o= $a ("bd1lfimg", "");
var oli= $a ("bd1lfimg", "DL");
var oliw=oli[0].offsetwidth; The width of each move
var ow=o.offsetwidth-2;
var dnow=0; Current position
var olf=oliw-(ow-oliw+10)/2;
o["ScrollLeft"]=olf+ (DNOW*OLIW);
var rqbd= $a ("BD1LFSJ", "ul") [0];
var extime;
<!--for (Var i=1;i<oli.length;i++) {rqbd.innerhtml+= "<li>" +i+ "</li>";} -->
var rq= $a ("BD1LFSJ", "Li");
for (Var i=0;i<rq.length;i++) {reg (i);};
Oli[dnow].classname=rq[dnow].classname= "Show";
var wwww=setinterval (uu,2000);
function Reg (i) {rq[i].onclick=function () {oli[dnow].classname=rq[dnow].classname= "";d now=i;oli[dnow].classname= Rq[dnow].classname= "Show"; MV ();}
function mv () {clearinterval (extime); clearinterval (WWWW); Extime=setinterval (bc,15); Wwww=setinterval (uu,8000);
function BC ()
{
var ns= ((Dnow*oliw+olf)-o["ScrollLeft");
var v=ns>0? Math.ceil (NS/10): Math.floor (NS/10);
o["ScrollLeft"]+=v;if (v==0) {clearinterval (extime); Oli[dnow].classname=rq[dnow].classname= "Show"; v=null;}
}
function UU ()
{
if (dnow<oli.length-2)
{
Oli[dnow].classname=rq[dnow].classname= "";
dnow++;
Oli[dnow].classname=rq[dnow].classname= "Show";
}
Else{oli[dnow].classname=rq[dnow].classname= "";d now=0;oli[dnow].classname=rq[dnow].classname= "show";}
MV ();
}
O.onmouseover=function () {clearinterval (wwww);}
O.onmouseout=function () {extime=setinterval (bc,15); Wwww=setinterval (uu,8000);}
}