jquery ajax获取下载文件

com*_*tta 7 javascript jquery callback

$.get(
url: downloadUrl,
function(data) {

//after get the data, how to ask browser pop up to save file?
}
); 
Run Code Online (Sandbox Code Playgroud)

数据是服务器端servlet转储的内容.可以是二进制的

Que*_*tin 8

不要仅仅使用Ajax location = downloadUrl;