第一种方法
xmlHttp.open("post", "Servlet?a=aaa&b=bbb", true);
xmlHttp.send(null);
这样后台是能拿到a和b的值的。
第二种方法,把值作为send的参数
xmlHttp.open("post", "Servlet", true);
xmlHttp.send(“a=aaa&b=bbb”);
这样后台不能接受到值,但书上写的就是第二种方法,为什么我就用起来不行呢?
第一种方法
xmlHttp.open("post", "Servlet?a=aaa&b=bbb", true);
xmlHttp.send(null);
这样后台是能拿到a和b的值的。
第二种方法,把值作为send的参数
xmlHttp.open("post", "Servlet", true);
xmlHttp.send(“a=aaa&b=bbb”);
这样后台不能接受到值,但书上写的就是第二种方法,为什么我就用起来不行呢?