导出excel

        var url = constants.api.abnormalAccount.exportAbnormalList + '?' + $.param(postData);
        var aLink = document.createElement("a");
        aLink.download = '';
        aLink.href = url;

        if (document.createEvent) {
            var e = document.createEvent('MouseEvents');
            e.initEvent('click', true, true);
            aLink.dispatchEvent(e);
        } else if (a.fireEvent) {
            aLink.fireEvent('onclick');
        };
原文地址:https://www.cnblogs.com/longsiyuan/p/9561791.html