json强转:将data强转为json

function(data) {
var msg= eval('('+data+')');
alert(msg.msg);
parent.window.closeDialog();
});

后台json发送

JSONObject json = new JSONObject();
json.put("msg", msg);

String jsonString=json.toJSONString();
response.getWriter().write(jsonString);

 

将对象转为字符串,传给前台展示


String json = JSONObject.toJSONString(queryBaseBatchResult);

response.getWriter().write(json);

 

trigger() 方法触发被选元素的指定事件类型。

$("#ThisForm input[value='Mail']").trigger("click");

 

相关文章:

  • 2021-11-28
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2021-07-11
  • 2022-01-25
猜你喜欢
  • 2021-06-17
  • 2021-10-05
  • 2021-11-27
  • 2022-12-23
  • 2021-11-17
  • 2021-12-29
  • 2021-08-12
相关资源
相似解决方案