HomeDownload button using js Timer Download Button Using JavaScript byMYFILES-DOWNUP -April 25, 2022 Timer Download Button Using JavaScript How To Set Timer Download Button Here's Code Of Button HTML 5 Get Link Copy CSS @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap'); *{ font-family: 'Poppins', sans-serif; background: #000; } #btn-link{ width:10rem; height:3em; justify-content: center; align-items: center; display: flex; border:none; background:linear-gradient(to left, #0000ff 10%, #00ff00 130%); color:#dfdfdf; font-weight: 900; font-size: 1rem; cursor: pointer; border-radius: 0.3rem; } div{ display:flex; justify-content: center; align-items: center; margin-top: 10%; } #second{ font-weight: 700; font-size:1.4rem; margin-left: -5%; margin-top: 70%; justify-content: center; align-items: center; display: flex; color:#dfdfdf; } Copy JAVASCRIPT function myLink(arg) { // body... let time = setInterval(myTime, 1000); let count = 5; let url = "https://google.com" function myTime(arg) { // body... document.getElementById("second").innerHTML = --count; if (count==0) { clearInterval(time); window.open(url) } } } Copy Result Facebook Twitter