js焦点图切换图片的数字按钮代码怎么写?要有鼠标点击、经过、离开的效果的

JavaScript012

js焦点图切换图片的数字按钮代码怎么写?要有鼠标点击、经过、离开的效果的,第1张

<div style="background-color: silverpadding:60pxwidth:130px" onclick="this.style.backgroundColor='green'" onmousemove="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='silver'" >520</div>

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">body{margin:0padding:0font-size:12pxcolor:#666background:#ccc}img{border:none}a{text-decoration:nonecolor:#666font-size:12px}#box{margin:100px autowidth:450pxheight:280pxbackground:#6666ccoverflow:hiddenposition:relativeborder:6px solid #ddd}#box #img{width:1820pxheight:280pxdisplay:blockoverflow:hiddenbackground:#fff}#box #img a{float:leftwidth:450pxheight:280pxdisplay:blockoverflow:hidden}#box #num{position:absoluteleft:340pxtop:250px}#box #num a{width:18pxheight:18pxdisplay:blocktext-align:centerline-height:18pxfloat:leftmargin-left:5pxbackground:#dddfilter:alpha(opacity=40)opacity:0.4overflow:hidden}#box #num a:hover,#box #num a.hover{opacity:0.9filter:alpha(opacity=90)background:#fffcolor:#3399ff}1234src="http://caac.people.com.cn/mediafile/201005/28/F201005281448063041613125.jpg" />src="http://i.weather.com.cn/images/cn/climate/2010/12/07/E6DCE96F021CD72EBAFA7E073740B290.jpg" />D2/pic/item/8bbc98c088041f843bdb4960.jpg" target="_blank" >

" />function S$(i){return document.getElementById(i)}function S$$(e,p){return p.getElementsByTagName(e)}var slideImage=function(){ var d,s,da,sa,st=10,w,sp,acls,MID,AID,isAuto=1,dir=1,lst=0,pos,cur=0,A,C,t=800,k=0,at=3000return{init:function(dst,src,width,time,interval,aclass){w=widthst=intervalt=time/stacls=aclassd=S$(dst)da=S$$("a",d)s=S$(src)sa=S$$("a",s)d.onmouseover=function(){clearInterval(AID)}d.onmouseout=function(){AID=setInterval("slideImage.autoplay()",at)}AID=setInterval("slideImage.autoplay()",at)for(var i=0isa[i].onmouseover=function(){j=0while(jclearInterval(AID)slideImage.slide(j-1)}sa[i].onmouseout=function(){AID=setInterval("slideImage.autoplay()",at)}} },slide:function(i){ if(i!=lst){sa[lst].className=""sa[i].className=aclslst=icur=iC=-i*wA=(-C+parseInt(d.style.marginLeft))/t/t/tk=0clearInterval(MID)MID=setInterval(function(){slideImage.mv()},st)}},mv:function(){sp=A*Math.abs(Math.pow(k-t,3))if(Math.abs(sp)d.style.marginLeft=sp+Ck++},autoplay:function(){if(cur==3)dir=-1if(cur==0)dir=1this.slide(cur+dir)}}}()