HTML Image OnClick
<!-- Have JavaScript open current image in a new window -->
<img src="https://i.imgur.com/7KpCS0Y.jpg" onclick="window.open(this.src)">
Wissam
<!-- Have JavaScript open current image in a new window -->
<img src="https://i.imgur.com/7KpCS0Y.jpg" onclick="window.open(this.src)">
<!DOCTYPE html>
<html>
<head>
<title>HTML Image as link</title>
</head>
<body>
The following image works as a link:<br>
<a href="https://www.qries.com/">
<img alt="Qries" src="https://www.qries.com/images/banner_logo.png"
width=150" height="70">
</a>
</body>
</html>
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')">