eventlistener for window code example
Example: eventlistener javascript
document.querySelector("button").addEventListener("click", handle);
function handle() {
alert("I got clicked")
}
document.querySelector("button").addEventListener("click", handle);
function handle() {
alert("I got clicked")
}