两种导出excel向后台请求方式,只在本页面弹出下载框。
1,
var form = $("<form>");
form.attr("style","display:none");
form.attr("target","");
form.attr("method","post");
form.attr("action","exportProgramExcel");
//参数
var order =$("<input>");
order.attr("type","hidden");
order.attr("name","ids");
order.attr("value",ids);
$("body").append(form);
form.append(order);
form.submit();
form.remove();
2,
window.open('exportProgramExcel?programName='+$("#programName").val()
+"&operationGroup="+$('#operationGroup').combobox('getValue'), "_self");
1,
var form = $("<form>");
form.attr("style","display:none");
form.attr("target","");
form.attr("method","post");
form.attr("action","exportProgramExcel");
//参数
var order =$("<input>");
order.attr("type","hidden");
order.attr("name","ids");
order.attr("value",ids);
$("body").append(form);
form.append(order);
form.submit();
form.remove();
2,
window.open('exportProgramExcel?programName='+$("#programName").val()
+"&operationGroup="+$('#operationGroup').combobox('getValue'), "_self");