var download = function (url) { $('<iframe></iframe>').css({ display: 'none', 0, height: 0 }).attr('src', url).appendTo(document.body); };
调用方式
$.ajax({ url: 'http://localhost:8080/emp/order/exportExcel/1', data: {"id": id}, success: function (data) { download(data.url); } });