“html img onclick” Code-Antworten

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

IMG auf HTML klicken

<!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>
Greater Roadrunner

html img onclick

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')">
Difficult Dingo

Ähnliche Antworten wie “html img onclick”

Fragen ähnlich wie “html img onclick”

Weitere verwandte Antworten zu “html img onclick” auf HTML

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen