📜  js addeventlistener click - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:34.885000             🧑  作者: Mango

代码示例3
const element = document.querySelector(".class__name");

element.addEventListener("click", () => {
    console.log("clicked element");
});