我添加一个div,选择获取第二个div的节点,该怎么改啊,
<body>
<div>
javascript
<p>javascript</p>
<div>jQuery</div>
<h5>PHP</h5>
</div>
<div>
javascfript
<p>jffscript</p>
<div>fery</div>
<h5>PHfP</h5>
</div>
<script type="text/javascript">
var x=document.getElementTagName("div")[0].childNodes;
for(i=0;i<x.length;i++){
document.write(x[i].nodeName+"<br />");
document.write(x[i].nodeValue+"<br />");
document.write(x[i].nodeType+"<br />");
}
</script>
</body>