Cómo detectar clics con JavaScript
element.addEventListener('click', function () {
alert('Clicked!')
});
stackoverflow.com
element.addEventListener('click', function () {
alert('Clicked!')
});