前台: $.ajax({ type: 'POST', url: url, dataType: "json", success : function(data){ alert("success:"+data+"-"+data.length); }, error : function(mes){ alert("error:"+mes); } });
③返回字符串
List list = ……
String json = JSONArray.fromObject(list).toString();
response.setContentType("text/html;charset=utf-8");
response.getWriter().write(json.toString());

相关文章:

  • 2021-11-23
  • 2021-06-20
  • 2021-12-05
  • 2022-12-23
  • 2021-11-23
  • 2021-11-23
猜你喜欢
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-12-25
  • 2022-12-23
相关资源
相似解决方案