function export_excel() { var number_row = $('#dg').datagrid('getRows'); let url = "http://miwork-5680278.minasoft.vn/human_resources/Timekeeping_day/export_excel_a_day"; $.ajax({ url : url, type : 'post', data : { 'data' : number_row, }, success : function (result){ window.open(url,'_blank'); }, error: function(){ alert("error when get data"); } }) }