Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xmlhttp.open("POST", url, true);
- xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
- xmlhttp.send(passParameter);
- if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
- document.getElementById("printBack").innerHTML = xmlhttp.responseText;
- }
- <%@page contentType="text/html; charset=UTF-8"%>
- <%@page import="org.json.simple.JSONObject"%>
- <%
- JSONObject obj=new JSONObject();
- obj.put("name","foo");
- obj.put("num",new Integer(100));
- obj.put("balance",new Double(1000.21));
- obj.put("is_vip",new Boolean(true));
- obj.put("nickname",null);
- out.print(obj);
- out.flush();
- %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement