标签:document 异步 log pat url load doc call append
//通过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 });
标签:document 异步 log pat url load doc call append
原文地址:http://www.cnblogs.com/oufeng/p/6866905.html