window.open("/order/export?ids=" + ids + "&type=" + type + "&clientid=" + clientId + "&areaid=" + area );
将get 请求改为表单post请求
var data = "ids=" + ids + "&type=" + type + "&clientid=" + clientId + "&areaid=" + area ; creaForm("export", "/order/export", data, "_blank");
function creaForm(name, url, data, target) { var myform = null; var inputs, input; var datas = data.split("&"); myform = $("<form></form>"); $(myform).attr('name', name); $(myform).attr('action', url); if (target != undefined) $(myform).attr('target', target); $(myform).attr('method', 'post'); $(datas).each(function (i) { inputs = datas[i].split("="); input = $("<input type='hidden' name='" + inputs[0] + "' />"); input.val(inputs[1]); $(myform).append(input); }); $(myform).css('display', 'none'); $(myform).appendTo("body"); $(myform).submit(); }