哪位大神告诉一下,为什么不可以输出内容,按理来说,思路应该没问题吧?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>节点属性</title>
</head>
<body>
<ul>
<li>javascript</li>
<li>HTML/CSS</li>
<li>jQuery</li>
</ul>
<script type="text/javascript">
var dd = document.getElementsByTagName("li");
for(var i = 0;<= dd.length;i++){
document.write(dd[i].nodeName +"<br>");
document.write(dd[i].nodeValue +"<br>");
document.write(dd[i].nodeType +"<br>");
}
</script>
</body>
</html>