Español
<!-- bbs http://www.downcodes.com/bbs--> <!-- 把下列代码加到<body>区域内 --> <script> var zoomimages=new Array("/img/200406301 .jpg","/img/200406302.jpg","/img/200406303.jpg","/img/200406304.jpg","/img/200406305.jpg") </script> <script> // más javascript de http://www.downcodes.com var imgpreload=new Array() for (i=0;i<=zoomimages.length;i++) { imgpreload[i]=new Image() imgpreload[i].src= zoomimages[i] } var zoomfactor=8 var positionleft=0 var positiontop=0 var temporizador var marginright=0 var i_fadestrength=5 var i_images=0 var paso=1 var contenido var imageboxwidthriginal=0 var imageboxwidth=0 var imageboxheight=0 var ancho de cuerpo=0 var altura de cuerpo=0 función setimage() { document.all.imagebox.style.visibility="oculto" ancho de cuerpo=document.body.clientWidth altura de cuerpo=document.body.clientHeight if (i_images>=zoomimages.length) {i_images =0} content="<img name='newpic' src='"+zoomimages[i_images]+"'>" imagebox.innerHTML=content imageboxwidthoriginal=document.newpic.width content="<img name='newpic' src ='"+zoomimages[i_images]+"' ancho=1>" imagebox.innerHTML=content document.all.imagebox.style.visibility="visible" imagebox.filters.alpha.opacity=100 zoomin() } función zoomin( ) { if (imageboxwidth<(imageboxwidthoriginal/1.3)) { imageboxwidth+=zoomfactor content="<img name='newpic' src='"+zoomimages[i_images]+"' width='"+imageboxwidth+"'>" imagebox. InnerHTML=contenido imageboxwidth=document.newpic.width imageboxheight=document.newpic.height document.all.imagebox.style.posLeft=bodywidth/2-imageboxwidth/2 document.all.imagebox.style.posTop=bodyheight/2-imageboxheight/ 2 document.all.imagebox.style.overflowX="oculto" document.all.imagebox.style.visibility="visible" paso+=1.1 imageboxwidth+=paso temporizador=setTimeout("zoomin()",50) } else { clearTimeout( temporizador) content="<img name='newpic' src='"+zoomimages[i_images]+"' width='"+imageboxwidthoriginal+"'>" imagebox.innerHTML=contenido imageboxwidth=document.newpic.width imageboxheight=document. newpic.height document.all.imagebox.style.posLeft=bodywidth/2-imageboxwidth/2 document.all.imagebox.style.posTop=bodyheight/2-imageboxheight/2 document.all.imagebox.style.overflowX="oculto" document.all.imagebox.style.visibility="visible" i_fadestrength=0; timer=setTimeout("zoomout()",2000) } } function zoomout() { if (i_fadestrength<120) { imageboxwidth+=zoomfactor content="<img name='newpic' src='"+zoomimages[i_images]+" ' width='"+imageboxwidth+"'>" imagebox.innerHTML=contenido imageboxwidth=document.newpic.width imageboxheight=document.newpic.height imagebox.filters.alpha.opacity=Math.floor(100-i_fadestrength) document.all. imagebox.style.posLeft=bodywidth/2-imageboxwidth/2 document.all.imagebox.style.posTop=bodyheight/2-imageboxheight/2 document.all.imagebox.style.overflowX="oculto" document.all.imagebox.style .visibilidad="visible" paso+=1.5 i_fadestrength+=paso temporizador=setTimeout("zoomout()",50) } else { clearTimeout(timer) i_fadestrength=0; paso=1; i_images++ imageboxwidth=0 setimage() } } if (document.all) { document.write("<DIV id='imagebox' style='position:absolute;filter:alpha(opacity=0);'></DIV> ") } if (document.all) { onload=setimage } </script>