event listener in javascript list code example
Example: how to add onclick event in javascript
var element = document.getElementById("elem");
element.onclick = function(event) {
console.log(event);
}
var element = document.getElementById("elem");
element.onclick = function(event) {
console.log(event);
}