Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
574 B
0
Indexable
Never
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>