//通过ifrmae异步下载文档
function iframeGetFile(opts) {
    var defaultOpts = {
        filePath: '',
        onload: function (e) { }
    }, iframeFile;
    $.extend(defaultOpts, opts);
    iframeFile = document.createElement("iframe");
    iframeFile.onload = function (e) {
        defaultOpts.onload.call(this, e);
        $(iframeFile).remove();
    }
    iframeFile.src = defaultOpts.filePath;
    iframeFile.style.cssText = "display:none;";
    document.body.appendChild(iframeFile);
},

调用:

$.iframeGetFile({ filePath: requestUrl + "?" + strOptions });

相关文章:

  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-09
  • 2021-07-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-17
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案