The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> why this code is not running, html error
aqeel
post 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>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic
aqeel   why this code is not running   Apr 12 2022, 08:53 AM
Christian J   Works for me. What's the error?   Apr 12 2022, 10:47 AM
Jason Knight   <center> What is this, 1997? <p>...   Feb 11 2023, 12:50 AM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th May 2024 - 12:34 PM