$.get(
url: downloadUrl,
function(data) {
//after get the data, how to ask browser pop up to save file?
}
);
数据是由服务器端 servlet 转储的内容。可以是二进制的
最佳答案
不要为此使用 Ajax,只需 location = downloadUrl;
关于javascript - jquery ajax获取下载文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5194853/