Bear Interview Collection Highlights

1. How to bind a button onclick event with two native js?

// event listener plurality of binding events 
var BTN = document.getElementById ( "BTN"); 
btn.addEventListener ( "the Click", hello1);
btn.addEventListener ( "the Click", of hello2);
function hello1 () { Alert ( "Hello. 1"); } function of hello2 () { Alert ( "Hello 2"); }

 

Guess you like

Origin www.cnblogs.com/520BigBear/p/11495984.html
Recommended