event事件基础 document

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<script>
		window.onload = function(){
			//document 的子节点  高版本浏览器中包括空格所以弹undefined
			
			alert(document.childNodes[0].tagName);//! ie中  这个!是<Doctype HTML> 
			
			
			alert(document.childNodes[1].tagName);//HTML
		}
	</script>
	<body>
	</body>
</html>

  document是最大的 

原文地址:https://www.cnblogs.com/mingjixiaohui/p/5268386.html