js控制div标签中间的文本
作者:admin 日期:2010-03-06
<html>
<head>
<title>tes</title>
<script>
messages = new Array();
messages[0] = "你好,最近忙吗?";
messages[1] = "欢迎你的到来";
messages[2] = "请多呆一会";
messages[3] = "你一定会有所收获的";
messages[4] = "Netscape Navigator不太支持这个";
var i=0;
</script>
</head>
<body>
<DIV id="content"
></DIV>
<script>
var x;
x=setInterval("show()",2000);
function show()
{
document.getElementById("content").innerHTML=messages;
//alert();
if(i<4) i++;else i=0;
}
</script>
</body>
</html>
评论: 0 | 查看次数: 7557