📌  相关文章
📜  js addeventlistener - Javascript 代码示例

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

代码示例5
// 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");
});