bạn có thể chỉnh lại nhé
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Đếm ngược thời gian</title>
</head>
<body>
<div id="countdown">60</div>
<div id="downloadLink" style="display: none;"><a href="https://example.com/download">Tải về</a></div>
<script>
var countdownElement = document.getElementById("countdown");
var downloadLinkElement = document.getElementById("downloadLink");
var seconds = 60;
function countdown() {
countdownElement.innerText = seconds;
if (seconds === 0) {
countdownElement.style.display = "none";
downloadLinkElement.style.display = "block";
} else {
seconds--;
setTimeout(countdown, 1000);
}
}
countdown();
</script>
</body>
</html>