Start 10 Sec Countdown When I Click Download Button | Advance Download Timer Script

नमस्कार दोस्तों, स्वागत है आपका Techly360 हिंदी ब्लॉग में. तो आज हम इस अमेजिंग आर्टिकल में जानेंगे Start 10 sec countdown When I Click Download Button के बारे में. वैसे तो आपके जानकारी के लिए बता दूँ Advance Download Button Script बहुत से मौजूद है. लेकिन ये आर्टिकल कुछ अलग ही है. So इस पोस्ट को लास्ट तक देखते रहिये.

Start 10 sec countdown When I Click Download Button

Start 10 sec countdown When I Click Download Button, Advance Download Timer Script, How can I make a 10 second countdown timer before a download button link appears

वैसे तो मैंने इससे पहले भी कुछ Download Timer Script उपलब्ध करवाया है. लेकिन उन Scripts में मैंने जो कोड Provide करवाया था. उसमे Countdown Timer के खत्म होने के बाद ही डाउनलोड बटन show होता था. लेकिन अब बहुत से ऐसे दोस्त भी है जिन्हें एडवांस डाउनलोड बटन स्क्रिप्ट चाहिए.

यानि की उस स्क्रिप्ट में उन्हें Download Button पर क्लिक करने के बाद टाइमर show हो और उसके बाद फिर डाउनलोड बटन show हो. यानि की When I Click on Download Button Then Start Countdown Timer जैसा HTML, CSS, JavaScript जैसे Script लोग सर्च करते है.

Also Read:

Advance Download Button Script with Countdown Timer

<style>
.button {
    background-image: linear-gradient(to right, #0066ff, #00a1ff, #00c6eb, #00e087, #a8eb12);
    border: 1px solid black;
    color: white;
    font-family: Arial;
    font-size: small;
    text-decoration: none;
    padding: 3px;
}
.techly360{
    background-image: linear-gradient(to right, #0066ff, #00a1ff, #00c6eb, #00e087, #a8eb12);
    color: white;
}
</style>

<div style="text-align: center;">
<a href="#" id="download" class="button">Download File</a>

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

<script>
var downloadButton = document.getElementById("download");
var counter = 10;
var newElement = document.createElement("p");
newElement.innerHTML = "10 sec";
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>


निष्कर्ष– So दोस्तों आपको यह How can I make a 10 second countdown timer before a download button link appears? का आर्टिकल कैसा लगा. नीच कमेंट करके अपनी राय जरुर दे और अपने दोस्तों के साथ पोस्ट को जरुर शेयर करे.

Comments are closed.