add event listener then js code example
Example: js addeventlistener
document.getElementById("example").addEventListener('click', function() {
alert('Click');
});
document.getElementById("example").addEventListener('click', function() {
alert('Click');
});