前台分頁: sidePagination: "client",對應的json格式必須為: [ { "id":1, "name":"張三", "age":22 }, ... ] 后台分頁: sidePagination: "server",對應的json格式必須為: { "total":20, "rows":[ { "id":1, "name":"張三", "age":22 }, ... ] }
com.force.json.JSONObject json_total = new com.force.json.JSONObject(); json_total.Put("total",200); json_total.Put("rows", jarray); //在這里組建后台分頁json格式 context.Response.Write(json_total.ToString()); context.Response.Flush();