<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" >
var x=document.getElementsByClassName("btn").length;
document.write(x);
</script>
</head>
<body>
<div class="btn">1</div>
<div class="btn">2</div>
<div class="btn">3</div>
<div class="btn">4</div>
</body>
</html>
为何输出结果是
0
1
2
3
4
?
德玛西亚99
相关分类