<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>document节点</title>
<script>
	function fun(){
		//获取节点
		var node = document.getElementById("divId");
		alert(node.nodeName+":"+node.nodeType+":"+node.nodeValue);
		//获取文本
		var text = node.innerHTML;
		alert(text);
		//此方法还能改变文本内容;
		//node.innerHTML="要改的内容"";
	}
</script>
</head>
<body>
	<input type="button" value="演示DOM" οnclick="fun()">
	<div id="divId">区域</div>
</body>
</html>