用原生javascript实现在页面动态显示时间

<!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>

上一篇:hadoop2.2.0+hive-0.10.0完全分布式安装方法


下一篇:HDFS设计思想