1script language =javascript
2var curIndex=0;
3//时间间隔 单位毫秒
4var timeInterval=1000;
5var arr=new Array();
6arr[0]="1.jpg";
7arr[1]="2.jpg";
8arr[2]="3.jpg";
9arr[3]="4.jpg";
10arr[4]="5.jpg";
11arr[5]="6.jpg";
12arr[6]="7.jpg";
13setInterval(changeImg,timeInterval);
14function changeImg()
15{
16 var obj=document.getElementById("obj");
17 if (curIndex==arr.length-1)
18 {
19 curIndex=0;
20 }
21 else
22 {
23 curIndex+=1;
24 }
25 o...[ 查看全文 ]