<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script>
window.onload = function () {
alert(document.getElementById('div1').getElementsByTagName['ul'][0].getElementsByTagName['li'].length);
}
</script>
</head>
<body>
<div id="div1">
<ul>
<li>nihao</li>
<li>js</li>
<li>hello</li>
<li>html5</li>
</ul>
</div>
</body>
</html>
js中为什么无法执行?
stone310
qq_薯条配可乐_03787165
chwech
相关分类