中文(繁体)
<!-- 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> // 更script多來自http://www.downcodes.com的javascript 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 Timer var marginRight=0 var i_fadestrength=5 var i_images=0 var Step=1 var 內容var imagestrength=5 var i_images=0 var Step=1 var 內容var imagestr 0 var bodywidth=0 var bodyheight=0 function setimage() { document.all.imagebox.style.visibility="hidden" bodywidth=document.body.clientWidth bodyheight=document.body.entHeight if { 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]+"' width=1>" imagebox.innerHTML=內容document.all.imagebox.style.visibility="visible" imagebox.filters.alpha.opacity=100 Zoomin() } 函數Zoomin( ) { if (imageboxwidth<(imageboxwidthoriginal/1.3)) { imageboxwidth+=zoomfactor content="<img name='newpic' src='"+zoomimages[i_images]+"' width='"+image>width+" 。 imageboxheight/ 2 document.all.imagebox.style.overflowX="隱藏" document.all.imagebox.style.visibility="visible" step+=1.1 imageboxwidth+=step 計時器=setTimeout("zoomin()",50) } elsestep 計時器=setTimeout("zoomin()",50) } elsestep 計時器=setTimeout("zoomin()",50) } elsestep 計時器=setTimeout("zoomin()",50) } elsestep 計時器=setTimeout("zoomin()",50) } elsestep. { clearTimeout(計時器) content="<img name='newpic' src='"+zoomimages[i_images]+"' width='"+imageboxwidthoriginal+"'>" imagebox.innerHTML=內容imageboxwidth=document.newpic.wid imageboxheight=document. newpic.height document.all.imagebox.style.posLeft=bodywidth/2-imageboxwidth/2 document.all.imagebox.style.posTop=bodyheight/2-imageboxheight/2 document.all.imflowbox.style.all. ="隱藏" document.all.imagebox.style.visibility="可見" i_fadstrength=0;計時器=setTimeout("zoomout()",2000) } } function Zoomout() { if (i_fadestrength<120) { imageboxwidth+=zoomfactor content="<img name='newpic' src='"+zoomimages[i_content="<img name='newpic' src='"+zoomimages[i_content="<img name='newpic' src='"+zoomi] " ' width='"+imageboxwidth+"'>" imagebox.innerHTML=內容imageboxwidth=document.newpic.width imageboxheight=document.newpic.height imagebox.filters.alpha.opacity=Math.floorent.newpic.height imagebox.filters.alpha.opacity=Math.floorent. . imagebox.style.posLeft=bodywidth/2-imageboxwidth/2 document.all.imagebox.style.posTop=bodyheight/2-imageboxheight/2 document.all.imagebox.style.overflowX="隱藏" document.all.imagebox. style .visibility="visible" 步驟+=1.5 i_fadestrength+=步計時器=setTimeout("zoomout()",50) } else {clearTimeout(timer) i_fadestrength=0;步驟=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>