<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>JavaScript 定时器修改页面</title>
<script type="text/javascript">
var ct=0;
var imgs=new Array("../images/likes.jpg","../images/flower.bmp","../images/girls.jpg");
setTimeout("progress()",3000);
function progress(){
if(ct<3){
document.images[0].src=imgs[ct];
ct++;
setTimeout("progress()",3000);
}
}
</script>
</head>
<body>
<img src="../images/moon.jpg"/>
</body>
</html>