<html> <body onLoad="slide()">
<script language="JavaScript" type="text/JavaScript">
var img = new Array(3); var start = null; var counter = 1; var delayTime ; delayTime = 2000;
if(document.images) { for(i = 1; i <= 3; i++) { img[i] = new Image(); img[i].src = "pic" + i + ".jpg"; //此处的SRC 属性修改一下 } }
function anim() { counter++; document.images[0].src = img[counter].src;
if(counter == 3) counter = 0; }
function slide() { start = setInterval("anim()", delayTime); } </script>
<img src="pic1.jpg" border=0 width=400 height=300> //此处的SRC 属性修改一下 </body> </html>
function anim() { counter++; document.images[0].src = img[counter].src;
if(counter == 3) counter = 0; 这是什么意思呀???? setInterval函数有什么功能么,他是什么意思呀?????????