<html>
<head>
<title>changePage</title>
</head>
<body>
<table id="pic" cellpadding="0" cellspacing="0" border="1" width="200" height="100" bordercolor="red">
<tr>
<td>picture chanage!</td>
</tr>
</table>
<script type="text/javascript">
<!--
window.οnlοad=function()
{
changePicture();
}
var time=0;
function changePicture(){
time++;
document.getElementById('pic').background="images/"+time+".jpg";
if(time==3)
changePicture1();
else
setTimeout(changePicture,500);
}
function changePicture1(){
document.getElementById('pic').background="images/"+time+".jpg";
time--;
if(time==0)
changePicture();
else
setTimeout(changePicture1,10000); //设定时间
}
-->
</script>
</body>
</html>