Cara Menambahkan Acara OnClick di JavaScript
var element = document.getElementById("elem");
element.onclick = function(event) {
console.log(event);
}
TC5550
var element = document.getElementById("elem");
element.onclick = function(event) {
console.log(event);
}