Cómo agregar el evento OnClick en 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);
}