click Event
noun
say it: “KLIK ih-VENT” /klɪk ɪˈvɛnt/
The event an element fires when someone clicks or taps it.
What is click Event in JavaScript?
click Event — The event an element fires when someone clicks or taps it, or presses Enter on a focused button. It's the event you listen for most.
document.getElementById("add").addEventListener("click", () => {
console.log("Added to cart");
});
In a sentence
- “A listener for the click event adds the product to the cart.”
Level: Novice · More JavaScript terms at this level
Updated