Untitled

 avatar
unknown
plain_text
2 years ago
574 B
5
Indexable
html
<!DOCTYPE html>
<html>
  <head>
    <title>Countdown Website</title>
    <script>
      var count = 10; // set the initial count to 10
      
      function decrementCount() {
        count--; // decrement the count by 1
        document.getElementById("countdown").innerHTML = count; // update the count in the HTML
      }
    </script>
  </head>
  <body>
    <h1>Countdown Website</h1>
    <p>Press the button to start the countdown:</p>
    <button onclick="decrementCount()">Countdown</button>
    <p>Countdown: <span id="countdown">10</span></p>
  </body>
</html>
Editor is loading...