<!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 con = document.getElementsByTagName("li");
for(var num=0;i<con.length;num++){
document.write(con[num].nodeName);
}
</script>
</body>
</html>
把i改成num 采纳一下我吧! 你再有什么问题我也会告诉你
for(var num=0;num<con.length;num++)
我找到错了,我傻了