admin管理员组文章数量:1316974
$.get(
url: downloadUrl,
function(data) {
//after get the data, how to ask browser pop up to save file?
}
);
data is content dumped by server side servlet. can be binary
$.get(
url: downloadUrl,
function(data) {
//after get the data, how to ask browser pop up to save file?
}
);
data is content dumped by server side servlet. can be binary
Share Improve this question asked Mar 4, 2011 at 14:13 ettaetta 35.8k84 gold badges220 silver badges329 bronze badges 3- Does this have to be done in AJAX rather than just linking to the file? – iivel Commented Mar 4, 2011 at 14:15
- the purpose of doing ajax get is need to put some custom header before do get – etta Commented Mar 4, 2011 at 14:16
- Hi, can you please explain how you fixed this.. ? – ria Commented Apr 2, 2013 at 3:47
1 Answer
Reset to default 8Don't use Ajax for this, just location = downloadUrl;
本文标签: javascriptjquery ajax get download fileStack Overflow
版权声明:本文标题:javascript - jquery ajax get download file - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742019341a2414374.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论