开发者

jquery ajax get download file

开发者 https://www.devze.com 2023-02-14 16:25 出处:网络
$.get( url: downloadUrl, function(data) { //after get the data, how to ask browser pop up to save file? }
$.get(
url: downloadUrl,
function(data) {

//after get the data, how to ask browser pop up to save file?
}
); 

data is content dumped by serve开发者_JAVA百科r side servlet. can be binary


Don't use Ajax for this, just location = downloadUrl;

0

精彩评论

暂无评论...
验证码 换一张
取 消