The document. Use the addEventListener is introduced

  • 2020-03-30 02:19:00
  • OfStack

Document. The addEventListener (" event name ", function, false);
 
function  A function (event){ 
//Methods to perform
} 

The last parameter in addEventListener determines the response order of the event;

If the order of execution for true events is addEventListener -- the onclick event of the tag -- document.onclick

If the events are false, the order is the label's onclick event -- document.onclick -- addEventListener

It is understood as a calling entry for other code

Related articles: