元素子节点不包括属性节点吗???
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
</head>
<body>
<div id="d">
javascript
<p>javascript</p>
<div name="f">jQuery</div>
<h5 id="k">PHP</h5>
</div>
<script type="text/javascript">
var x=document.getElementsByTagName("div")[0].childNodes;
document.write(x.length+"<br/>"+"<hr/>")
for(var i=0;i<x.length;i++)
{
document.write("第"+(i+1)+"个子节点的名字:"+x[i].nodeName+"<br/>")
document.write("第"+(i+1)+"个子节点的值:"+x[i].nodeValue+"<br/>")
document.write("第"+(i+1)+"个子节点的类型:"+x[i].nodeType+"<br/>"+"<br/>")
}
</script>
</body>
</html>