@H_502_0@Controller Java代码 @H_502_0@
@RequestMapping(value="/exportExcel",method = RequestMethod.POST) @ResponseBody public String exportExcel(<span style="color:#FF0000;">@RequestParam(value = "titles[]")</span> String[] titles){ System.out.println(titles); return null; }
@H_502_0@jsp页面 Js代码 @H_502_0@
var param = {titles:['col1','col2','col3']}; $.ajax({url:url,type:"post",data:param,async:false,dataType:"json",cache:false,error:function (data) { rtnObj = data.responseText; },beforeSend:function (XMLHttpRequest) { //ajaxStart(); },complete:function (XMLHttpRequest,textStatus) { //ajaxComplete(); },success:function (data) { rtnObj = data; }});