参考答案:
1//事件监听 绑定多个事件 2var btn = document.getElementById("btn"); 3 4btn.addEventListener("click",hello1); 5btn.addEventListener("click",hello2); 6 7function hello1(){ 8 alert("hello 1"); 9} 10function hello2(){ 11 alert("hello 2"); 12}
最近更新时间:2021-09-25