用什么脚本可以使DIV层每一秒刷新一次

来源:百度知道 编辑:UC知道 时间:2024/06/18 06:37:31
麻烦帮我把代码写出来吧 谢谢大家 要JS脚本的^^

需要知道你刷新的内容从何而来。方法是有的
一个简单例子:
------------------------------------
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script type="text/javascript">
function Reflesh(){
document.getElementById("show").innerHTML=new Date().getSeconds();
}
window.onload=window.setInterval("Reflesh()",1000);
</script>
<body>
<div id="show">这里是要显示的内容</div&g