更新时间:2023-10-17 17:31:52
这是我们使用IFRAME
导出excel文件的方式:
Here is the way we export an excel file using an IFRAME
:
function download(src){
var ifr = document.createElement('iframe');
ifr.style.display = 'none';
document.body.appendChild(ifr);
ifr.src = src;
ifr.onload = function(e){
document.body.removeChild(ifr);
ifr = null;
};
}
它适用于所有浏览器,并且具有不弹出窗口的优点.
It works in all browsers, and has the advantage of not popping up a window.