[英]Download property in HTML tag not working with BLOB file
I am working on a project on my website Click here to go to project site , but after inputting all the needed information, the download element does not work. 我正在我网站上的一个项目上工作单击此处转到项目站点 ,但是输入所有必需的信息后,download元素不起作用。 Here is the code for the download link: The download may work on this website, but it doesn't work on my website, which is strange. 这是下载链接的代码:下载可能在此网站上可以进行,但是在我的网站上却不起作用,这很奇怪。
<a id="down" href="blob:http://veryblankwhitepaper.weebly.com/8d869eaa-5bce-4326-9dff-dd0b50286a84" download="filename.txt">DOWNLOAD</a>
Edit1: If I take the element out of the div that it is in, it seems to work, but I want it to still be in the div. Edit1:如果我从元素所在的div中取出该元素,它似乎可以工作,但我希望它仍位于div中。
Your scripts change the link too quickly. 您的脚本更改链接的速度过快。 Try adding a setTimeout function for half a second when you click the link. 单击链接时,尝试添加setTimeout函数半秒钟。 This should allow it to download. 这应该允许它下载。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.