datatables excel导出已完成回调

时间:2019-03-20 13:57:47

标签: javascript datatables export-to-excel

导出完成后如何执行功能?

"buttons": [{
  extend: 'excelHtml5',
  className: 'btn btn-outline-success active',
  text: 'Exportar para Excel',
  action: function (e, dt, node, config) {
    var that = this;
    
    dt.page.len(-1).draw();
    dt.on('draw', function () {
      $.fn.dataTable.ext.buttons.excelHtml5.action.call(that, e, dt, node, config);
    });
    
    //calback excelHtml5 is complete

  }
}]

我尝试过类似的

"fnComplete": function ( nButton, oConfig, oFlash, sFlash ) {
                location.reload();
            },

没用

0 个答案:

没有答案