<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id = "time">2021-1-14</div>
<script>
var timer = document.getElementById('time');
console.log(timer);
console.log(typeof timer);
console.dir(timer);
</script>
</body>
</html>
08-14
2672
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-02
7136
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)