English
<!--Copy the following code into <head>~</head>--> <script> <!--// //Define the width and height of the image, all images must have the same size; var imgwidth=150 var imgheight=200 //The following defines an array containing 2 pictures. The subscript of the array starts from 0. You can add any pictures in order. Pay attention to increase the array subscript accordingly. var imgname=new Array() imgname[0]="/img/200406301.jpg" imgname[1]="/img/200406302.jpg" imgname[2]="/img/200406303.jpg" //Definition below The URL of the image. If no URL is required, set the connection value to "#"; var imgurl=new Array() imgurl[0]="http://www.downcodes.com" imgurl[1]="http:/ /www.downcodes.com/bbs/" imgurl[2]="http://www.downcodes.net" // Pre-read the image first, do not modify it; var imgpreload=new Array() for (i=0; i<=imgname.length-1;i++) { imgpreload[i]=new Image() imgpreload[i].src=imgname[i] } var pause=2000 //The display speed of the image, the smaller the value, the faster; var speed=20 //The following parameters will also affect the speed of picture display. Small values are faster; they represent the display interval between two pictures. var step=10 //Do not modify the following code; var i_loop=0 var i_image=0 function stretchimage() { if (i_loop<=imgwidth) { if (document.all) { imgcontainer.innerHTML="<a href=' "+imgurl[i_image]+"' target='_blank'><img width='"+i_loop+"' height='"+imgheight+"' src='"+imgname[i_image]+"' border='0' ></a>" } i_loop=i_loop+step var timer=setTimeout("stretchimage()",speed) } else { i_loop=imgwidth clearTimeout(timer) imgcontainer.innerHTML="<a href='"+imgurl[i_image ]+"' target='_blank'><img src='"+imgname[i_image]+"' border='0'></a>" var timer=setTimeout("shrinkimage()",pause) } } function shrinkimage() { if (i_loop>=0) { if (document.all) { imgcontainer.innerHTML="<a href='"+imgurl[i_image]+"' target='_blank'><img width=' "+i_loop+"' height='"+imgheight+"' src='"+imgname[i_image]+"' border='0'></a>" } i_loop=i_loop-step var timer=setTimeout("shrinkimage( )",speed) } else { i_loop=0 clearTimeout(timer) changeimage() } } function changeimage() { i_image++ if (i_image>=imgname.length) {i_image=0} if (document.layers) { document.imgcontainer .document.write("<a href='"+imgurl[i_image]+"' target='_blank'><img src='"+imgname[i_image]+"' border='0'></a> ") document.imgcontainer.document.close() } stretchimage() } //more javascript from http://www.downcodes.com // --> </script> <style> .containerstyle { position:absolute; } </style> <!--Copy the following code into <body>--> <body onLoad="stretchimage()"> <!--Copy the following code into <body>~</body> --> <span id="imgcontainer" class="containerstyle"></span>