<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div>
<!--显示当前时间-->
<div id="now_time" style="font-size: 18px;"></div>
<script>
setInterval("now_time.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());",1);
</script>
</div>
</body>
</html>
网友评论