Advertisment

 
.timerd2{    
color: blue;
cursor: pointer;
}




<div style="text-align: center;">
<a href="https://icon-inside.blogspot.com/2017/12/kushtia-students-care-ssc-care-ssc.html" id="timerdwnl">Download Now !</a>

<span id="timrbtn" class="timerd2">Click to Download</span>




<script type='text/javascript'>
   //<![CDATA[
   var downloadButton = document.getElementById("timerdwnl");
var counter = 30;
var newElement = document.createElement("p");
newElement.innerHTML = "File is ready to download";
var id;

downloadButton.parentNode.replaceChild(newElement, downloadButton);

function startDownload() {
    this.style.display = 'none';
    id = setInterval(function () {
        counter--;
        if (counter < 0) {
            newElement.parentNode.replaceChild(downloadButton, newElement);
            clearInterval(id);
        } else {
            newElement.innerHTML = +counter.toString() + " second.";
        }
    }, 1000);
};

var clickbtn = document.getElementById("timrbtn");
clickbtn.onclick = startDownload;
//]]>
    </script>

Post a Comment

أحدث أقدم