function ExportExcel(url, vals) { var form = jQuery("<form action='" + url + "' method='post'></form>"); for (var key in vals) { var hInput = $("<input type='hidden'></input>").attr("name", key).val(vals[key]); form.append(hInput); } jQuery("body").append(form); form.submit(); form.remove(); }
vals参数为对象