这样子就好了
<!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 dgt=document.getElementsByTagName("li");
for(var i=0;i<dgt.length;i++){
var nna=dgt[i].nodeName;
var nva=dgt[i].nodeValue;
var nty=dgt[i].nodeType;
}
document.write(nna+"<br/>"+nva+"<br/>"+nty);
</script>
</body>
</html>