📌  相关文章
📜  addeventlistener javascript 代码示例

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

代码示例6
// The anwer of Innocent Ibis is wrong!!
// It should not have a # for the ID seens we are using getElementById
var element = document.getElementById("id");
element.addEventListener('click', function(){
    console.log("click");
});