今天做了个定时器代码发现了个误区
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script>
window.onload=function(){
console.log(document.getElementsByTagName("h5")[0].innerText+"");
}
</script>
</head>
<body>
<h5>asd</h5>
</body>
</html>