📜  js 添加点击监听 - Javascript 代码示例

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

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

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