window.setInterval( jsCode, interval)
window.setInterval( function, interval, [parameters])
<html>
<head>
<title>在状态栏显示时间</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<script type="text/javascript" language="javascript">
<!--
window.setInterval("showTime()", 1000);
function showTime() {
var now = new Date();
window.status = "当前的时间为:" + now.toLocaleString();
}
-->
</script>
</head>
<body>
</body>
</html>
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |