why this code is not running, html error |
why this code is not running, html error |
aqeel |
Apr 12 2022, 08:53 AM
Post
#1
|
Group: Members Posts: 1 Joined: 12-April 22 Member No.: 28,312 |
<center>
<p></p> <button class="srd" id="btn"><b>click here to get code </b></button> <a class="button" href="" id="download"> BR260695 </a> <script> var downloadButton = document.getElementById("download"); var counter = 19000; 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() + "<b>⏱️ WAIT A Second</b>."; } }, 0); }; var clickbtn = document.getElementById("btn"); clickbtn.onclick = startDownload; </script> </center> |
Lo-Fi Version | Time is now: 18th May 2024 - 12:34 PM |