java background session.setAttribute("dh",t); or request.setAttribute();
How to get it in the html page? If it is a jsp page: <%=session.getAttribute("dh") %>
But you cannot use jsp pages, you can only use html. Can JS be used? How can I get it?
Since it is a java background, it can only be obtained with jsp
If I convert the value of the background into json
JSONArray json = new JSONArray().fromObject(t);
PrintWriter outpw = response.getWriter();
String jsonto = json.toString();
outpw.write(jsonto);
How can I get it from the front-end html? Without strust2
js, how can I get the back-end json
Can I get it from JS?
You can use ajax to get it
Baidu
Refer to the example
$.ajax How to implement it specifically? Please post it. I tried it several times and got it. Not worth it