var download = function (url) {
        $('<iframe></iframe>').css({
            display: 'none',
            width: 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);
                        }
                    });

 

相关文章:

  • 2021-09-01
  • 2022-01-12
  • 2021-08-31
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-26
  • 2021-09-22
  • 2022-02-12
  • 2021-06-26
  • 2022-03-03
相关资源
相似解决方案