<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>js demo1</title>
</head>
<body>
<script src="cLanguage.js">
var t = null;
t = setTimeout(time,1000);
function time(){
clearTimeout(t);
dt = new Date();
var h = dt.getHours();
var m = dt.getMinutes();
var s = dt.getSeconds();
document.getElementById("timeShow").innerHTML="现在的时间:" + h + "时" + m + "分" + s + "秒";
t = setTimeout(time,1000);
}
</script>
<label id="timeShow"></lable>
</body>
</html>
时间: 2024-10-11 08:52:22