js document

时间:2021-10-21 10:02:12
<html><head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body> <p></p>
<img src="img/img_01.jpg">
<a href="#">百度一下</a>
<p></p> <script>
console.log(document.all);
</script> </body></html>

打印结果:

HTMLAllCollection[]: html1: head2: meta3: title4: body5: p6: img7: a8: p9: scriptlength: 10__proto__: HTMLAllCollection