【发布时间】:2012-09-04 03:22:58
【问题描述】:
可能重复:
Download File Using jQuery
Download File Using Javascript/jQuery
$('#download').click(function() {
var url = 'http://www.mysite.com/123.txt';
location.href = url;
});
该按钮使浏览器浏览文件而不是提示下载。有没有办法做到这一点?
【问题讨论】: