获取特殊元素
<!DOCTYPE html>
<html lang="en">
<head></head>
<body>
<script>
// 1.获取body 元素
var bodyEle = document.body;
console.log(1, bodyEle);
console.dir(bodyEle);
// 2.获取html 元素
var htmlEle = document.documentElement;
console.log(2, htmlEle);
</script>
</body>
</html>