首页 > 代码库 > 显示实时日期时间(html+js)

显示实时日期时间(html+js)

<!DOCTYPE>
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>

<body>
<span></span>
<script>
(function() {
var a = {
a : (function() {
document.getElementsByTagName("span")[0].innerHTML = new Date().toLocaleString();
setTimeout("_a.a()", 1000);
})
};
window._a = a;
})();
_a.a();
</script>
</body>
</html>

显示实时日期时间(html+js)