<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
window.onload = function(){
var Btn = document.getElementsByTagName("button");
Btn.addEventListener("click", function(){
alert("点击一");
},true);
Btn.addEventListener("click", function(){
alert("点击二");
},true);
}
</script>
</head>
<body>
<button id="xxx">按钮</button>
</body>
</html>
为什么只能用getElementById得到button的值?