“HTML IMG ONCLICK” Kode Jawaban

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 pada klik html

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

Jawaban yang mirip dengan “HTML IMG ONCLICK”

Pertanyaan yang mirip dengan “HTML IMG ONCLICK”

Lebih banyak jawaban terkait untuk “HTML IMG ONCLICK” di HTML

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya