how to add click event on button in js 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);
}