I’m using a timer script that I’d like to change the displayed text in the <p> ... </p> when the countdown ends but have no idea how to accomplish it. I’d appreciate any help I can get. Here’s the code I’m using:
<p> The Update will be done in <span id="countdowntimer">20 </span> Seconds</p>
<script type="text/javascript">
var timeleft = 20;
var downloadTimer = setInterval(function(){
timeleft--;
document.getElementById("countdowntimer").textContent = timeleft;
if(timeleft <= 0)
clearInterval(downloadTimer);
},1000);
</script>
Thanks in advance