设置一个定时器就可以了
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script language="javascript">
<!--
var a=0;
function conChange(i){
var con=document.getElementById("content");
switch(i){
case 0:
con.innerHTML="第一次";
break;
case 1:
con.innerHTML="第二次";
break;
case 2:
con.innerHTML="第三次";
break;
default:
con.innerHTML="";
}
}
function test(){
conChange(a);
a++;
window.setTimeout(test,5000);
}
window.onload=test;
-->
</script>
<body>
<div id="content" style="border:1px #0000FF solid;height:20px;width:80px;"></div>
</body>
</html>