时间:2021-01-09 11:15:53 | 栏目:JavaScript代码 | 点击:次
JSONObject把对象转换成的json字符串,无法直接通过request.setAttribute();传到页面的input标签
如下是错误的:
request.setAttribute(“pageInfoJsonStr”, JSONObject.fromObject(pageInfo).toString());
还需要 jsonStr.replaceAll(“\”“, “'”)再放到request.setAttribute中