jeudi 14 mars 2024

html

 <button id="startButton" onclick="startCountdown()" style="background-color: yellow; border-color: red;">.....Get Link.....</button>


<div id="countdown" style="display: none;"></div>


<button id="redirectButton" onclick="redirectToAnotherPage()" style="background-color: yellow; border-color: red; display: none;"> Ready. Go !</button>


<script>

function startCountdown() {

    document.getElementById("startButton").style.display = "none";

    document.getElementById("countdown").style.display = "block";

    

    var seconds = 20;

    var countdownElement = document.getElementById("countdown");

    

    var countdownInterval = setInterval(function() {

        countdownElement.innerHTML = "Wait " + seconds + " secondes...";

        seconds--;

        

        if (seconds < 0) {

            clearInterval(countdownInterval);

            countdownElement.innerHTML = "";

            document.getElementById("redirectButton").style.display = "block";

        }

    }, 1000);

}


function redirectToAnotherPage() {

    // Remplacez 'autrepage.html' par l'URL de la page vers laquelle vous souhaitez rediriger

    window.location.href = 'https://ydepdeploihayhay.blogspot.com/2024/03/43-questions-answers-entretien-cnet.html';

}

</script>

Aucun commentaire:

Enregistrer un commentaire