Today I just wrote a post about “Why do we use the letters like “e” in e.preventDefault()?” and I think my answer will make some sense…
At first,let us see the syntax of addEventListener
Normally it will be: target.addEventListener(type, listener);
And the definition of the parameters of addEventlistener are:
type ：A string representing the event type to listen out for.
let us try the example as below:
Please click on the checkbox control.