首页 > 代码库 > Struts2:前台提交JSON数组

Struts2:前台提交JSON数组

JS:

$.ajax({url : {URL},type : "POST",data : {"list[0]":{VALUE0},"list[1]":{VALUE1}},scriptCharSet : "UTF-8",success : function(data) {}});

FORM:

public class Form{  private List list;   public List getList(){    return this.list;   }   public void setList(List list){     this.list = list;   }}