Timer Download Button Script बटन पर क्लिक करने के डाउनलोड टाइमर शुरू होगा फिर Download Button दिखेगा



<style>

.button {

background-image: linear-gradient(to right, #0066ff, #00a1ff, #00c6eb, #00e087, #a8eb12);

border: 2px solid black;

color: white;

font-family: Arial;

font-size: small;

text-decoration: none;

padding: 5px;

}

.techly360{

background-image: linear-gradient(to right, #0066ff, #00a1ff, #00c6eb, #00e087, #a8eb12);

color: white;

}

</style>

<div style="text-align: center;">

<a class="button" href="https://www.ringtonesong.in/?m=1" id="download">Download File</a>

<button class="techly360" id="btn">Click To Download</button>

<script>

var downloadButton = document.getElementById("download");

var counter = 10;

var newElement = document.createElement("p");

newElement.innerHTML = "";

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("btn");

clickbtn.onclick = startDownload;

</script></div>



Post a Comment (0)
Previous Post Next Post