Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
471 B
1
Indexable
Never
<!DOCTYPE html>
<html>
  <head>
    <title>Button Click Example</title>
  </head>
  <body>
    <button onclick="showDog()">Show Dog</button>
    <br><br>
    <img id="dog-image" style="display:none" src="https://images.dog.ceo/breeds/whippet/n02091134_5775.jpg" width="400" height="400">
    <script>
      function showDog() {
        var dogImage = document.getElementById("dog-image");
        dogImage.style.display = "block";
      }
    </script>
  </body>
</html>