节点值为null
<body> <ul> <li>javascript</li> <li>HTML/CSS</li> <li>jQuery</li> </ul> <script type="text/javascript"> var a = document.getElementsByTagName("li"); for(var i = 0; i < a.length; i++){ document.write("" + a[i].innerHTML + "<br>"); document.write("元素节点是:" + a[i].nodeName + "<br>"); document.write("节点值是:" + a[i].nodeValue + "<br>"); document.write("节点类型是:" + a[i].nodeType + "<br>"); } </script> </body>