<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script>
   var index=1;
   var col=new Array();
   col[1]="yellow"
   col[2]="blue"
   col[3]="orange"
   col[4]="red"
   col[5]="green"
   function changcolor(){
    if(index>=5)
       index=1;
  else
    document.bgColor=col[index++]
    setTimeout('changcolor()',2000);
   }
</script>
</head>

<body οnlοad="changcolor()">

</body>
</html>