相关疑难解决方法(0)

使用jQuery下载文件

如何在用户单击链接时提示下载.

例如,而不是:

<a href="uploads/file.doc">Download Here</a>
Run Code Online (Sandbox Code Playgroud)

我可以用:

<a href="#">Download Here</a>

 $('a').click... //Some jquery to download the file
Run Code Online (Sandbox Code Playgroud)

这样,Google就不会将我的HREF和私人文件编入索引.

这可以用jQuery完成,如果是这样,怎么样?或者应该用PHP或其他东西来完成?

jquery file download

108
推荐指数
7
解决办法
42万
查看次数

标签 统计

download ×1

file ×1

jquery ×1