JavaScript OnClick Image
const image = document.getElementById('yourImage');
image.addEventListener("click", (event) => {
// Do stuff with your event!
});
I_Like_Cats__
const image = document.getElementById('yourImage');
image.addEventListener("click", (event) => {
// Do stuff with your event!
});
just add a onclick property to your element like so :
<img src="whtever" onclick"alert('what you want to hapen when clicked by using js')">