为啥第二个按钮没有作用了,看了半天没看出问题
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>DOM0级事件</title>
<script>
function add(){
alert('我这算是0级事件')
}
var jiji=document.getElementById('werr');
jiji.onclick=function(){
alert("hello js");
}
</script>
</head>
<body>
<input type="button" value="按钮1" id="wer" onclick="add()">
<input type="button" value="按钮2" id="but2">
</body>
</html>