[英]download file from localhost
I want to put an image on my web and when clicked it will download a specific file. 我想将图像放在我的网络上,单击该图像将下载一个特定的文件。 is this the correct script for this purpose ?
这是正确的脚本吗? but when I click there is no response.
但是当我单击时没有任何反应。
<td><a href="file:download/D411.zip"><img src="images/download.png" title="Download"></a></td>
Thank you for the help 感谢您的帮助
尝试这个
<a href="download/abc.zip" download>Download link here</a>
I assume the download
folder is in the same directory from where you are executing this snippet. 我假设
download
文件夹与执行此代码片段的目录位于同一目录中。
Change 更改
<a href="file:download/D411.zip">
to 至
<a href="download/D411.zip">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.