ouvinte de evento JavaScript OnClick
document.getElementById("myBtn").addEventListener("click", function() {
alert("Hello World!");
});
Batman
document.getElementById("myBtn").addEventListener("click", function() {
alert("Hello World!");
});
const element = document.querySelector(".class__name");
element.addEventListener("click", () => {
console.log("clicked element");
});
element.addEventListener("click", function(){
element.innerText = "something";
});