<div class="codetitle"> <span><a style="CURSOR: pointer" data="55389" class="copybut" id="copybut55389" onclick="doCopy('code55389')"><u>Copy code</u></a></span> The code is as follows:</div> <div class="codebody" id="code55389"> <br><script language =javascript > <br>var curIndex=0 ; <br>//Time interval in milliseconds<br>var timeInterval=1000; <br>var arr=new Array(); <br>arr[0]="1.jpg"; <br>arr[1] ="2.jpg"; <br>arr[2]="3.jpg"; <br>arr[3]="4.jpg"; <br>arr[4]="5.jpg"; <br>arr[5]="6.jpg"; <br>arr[6]="7.jpg"; <br>setInterval(changeImg,timeInterval); <br>function changeImg() <br>{ <br> var obj=document.getElementById("obj"); <br> if (curIndex==arr.length-1) <br> { <br> curIndex=0; <br> } <br> else <br> { <br> curIndex =1; <br> } <br> obj.src=arr[curIndex]; 1.jpg" border =0 /> <br>You can configure it yourself, set the time interval for each picture switching, and set the path of each picture yourself (absolute or relative paths are acceptable) <br>Although it is very simple, but Very practical. <br><br> </div>