当用户点击链接时,文件应该下载 [英] when user click on link, file should download
本文介绍了当用户点击链接时,文件应该下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨专家,
i有一个页面有很多链接(锚点)当用户点击任何链接然后文件应该下载
例如
Hi experts,
i have a page there are many links(anchor) when user click on any link then file should download
e.g.
<a href="download/image1.jpg"> Download Image1</a>
请帮助
please help
推荐答案
从锚执行服务器端处理程序
您可以调用服务器端处理程序并在那里编写代码来下载文件。
这将是最好的技术。
按照答案 - 在html上下载音频文件chor链接单击独立的浏览器操作 [ ^ ]。 />
一篇不错的文章 - 使用JavaScript下载文件 [ ^ ]。
客户端的jQuery库
jquery.fileDownload.js Library [ ^ ]。
谢谢......
Execute Server side handler from anchor
You can call server side handler and write code there to download the file.
That will be the best technique.
Follow the answer - Download audio file on html anchor link click independant of browser action[^].
One nice article - File Download Using JavaScript[^].
jQuery library for client-side
If you want to do it in client-side better to use jquery.fileDownload.js Library[^].
Thanks...
这篇关于当用户点击链接时,文件应该下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文