标签:
<!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>
标签:
原文地址:http://www.cnblogs.com/yangwenxin/p/5858492.html