所以我尝试使用脚本来计时我网站上的下载时间,但在更改计时器为 0 时它执行的操作时遇到了麻烦。这是代码:
else{
//After the counter download the file and end the timer
document.getElementById("time").innerText = "Now";
download();
return;
}
现在,而不是说“现在”并使用“download();”自动下载我如何让它显示超链接而不是“现在”? 非常感谢所有帮助。提前致谢! -马特。
最佳答案
不太清楚你在问什么,但这里是......
var link = "http://link_to_download";
document.getElementById("time").innerHTML = "<a href = " + link + ">Now</a>;
关于Javascript 定时下载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12995724/