// 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"); });