Countdown Timer HTML

 Countdown Timer HTML:-

In Some Websites We See that a Countdown is Loading Before Downloading Something.Here I Discuss about How to Add Countdown Timer in Blogger.  

Simple Countdown Timer HTML:-


  • Login on Blogger.com
  • Goto Posts or Page Section (If You Want Timer in Your Page Then Goto Page or If You Want Timer in Post then Goto Post)
  • Copy and Paste the Below Code 


<br />
ADSENSE CODE - 1
<br>
<div dir="ltr" style="text-align: left;" trbidi="on">
<script>
   var count = 15; // Number of remaining seconds.
   var counter; // Handle for the countdown event.
   
   function start() {
    counter = setInterval(timer, 1000);
   }

   function timer() {
    // Show the number of remaining seconds on the web page.
    var output = document.getElementById("displaySeconds");
    output.innerHTML = count;
    
    // Decrease the remaining number of seconds by one.
    count--;
    
    // Check if the counter has reached zero.
    if (count < 0) { // If the counter has reached zero...
     // Stop the counter.
     clearInterval(counter);
     
     // Start the download.
     window.location.href = "https://downlaoding website link";
     return;
    }
   }  
   // Start the countdown timer when the page loads. 
   window.addEventListener("load", start, false);
  </script>

<br />
Your download will begin in <span id="displaySeconds">15</span> seconds.
<br />
<br />
ADSENSE CODE - 2
<br>
<a href="https://downloading website link">Click here if your download does not begin.</a></div>


  • After Pasting the Code Copy the Downloading Website link and Paste it in window.location.href & in the last line of the code <a href>.
  • If You Want to Change the Duration of the Timer Then Change the Var Count & Display Seconds
  • If You Want to Add Some Ads on Your Website then Paste Your ads Code in ADSENSE CODE - 1 & ADSENSE CODE - 2
  • Save the Page or Post & View Page or Post
  • Done


This post is related to-

countdown timer html
javascript timer countdown with seconds
countdown html
simple countdown timer html
countdown timer javascript code





Post a Comment

0 Comments