1 <script> 2 document.getElementById("a").addEventListener("click", function() { 3 alert("1"); 4 }); 5 6 document.getElementById("a").addEventListener("click", function() { 7 alert("2"); 8 }); 9 10 document.getElementById("a").addEventListener("click", function() { 11 alert("3"); 12 }); 13 </script>
按绑定的顺序来执行