求问各位大神,为什么节点的名称、值都没输出呢?
<!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 text=document.getElementsByTagName("li");
//document.write("没错吧"+text[0].nodeVlue);
for(var i=0; i<text.length;i++){
document.write("节点的名称为:"+text[i].nodeName+"<br />"+"节点的值为:"+text[i].nodeValue+<b />+"节点的类型为:"+text[i].nodeType+<br />);
}
</script>
</body>
</html>