Код: Выделить всё
function startDownload(url) {
const button = document.getElementById('downloadBtn');
let i = 0;
button.disabled = true; // optional: disable the button during countdown
const timer = setInterval(() => {
i++;
const counter = 29 - i;
button.textContent = 'Please Wait... ' + counter;
if (counter === 0) {
clearInterval(timer);
window.location.href = url;
}
}, 1000);
}< /code>
Free Download
Free Download
Free DownloadПодробнее здесь: https://stackoverflow.com/questions/795 ... dated-post
Мобильная версия