我用http_request.open("GET", "b.jsp?username=xxx", true);向b.jsp请求处理
http_request.responseText是我的返回值
当我在b.jsp写out.print(结果);时候,结果能返回到原页面,http_request.responseText能收到原来的值
但是如果我是一个form对象,或者是个list和hashMap,又该怎么传回去呢。谢谢了
http_request.responseText是我的返回值
当我在b.jsp写out.print(结果);时候,结果能返回到原页面,http_request.responseText能收到原来的值
但是如果我是一个form对象,或者是个list和hashMap,又该怎么传回去呢。谢谢了
JSON是JS的一种对象格式。
{
"name":"john",
"address":"天津",
..
}这就是JSON格式
http://www.json.org/
我比如out.print("1");out.print("2");out.print("3");
http_request.responseText是把所有值一起接受过来了
var a = http_request.responseText
a就等于123了;