Pass many args as follow:
1.String argcontent = "arg1=value1&arg2=value2......";
2.xmlHttpResquest.open("POST", "Sevlet_URL", true);
3.xmlHttpResquest.setRequestHeader( "Content-type", "application/x-www-form-urlencoded");
4.xmlHttpResquest.send(argcontent);
本文介绍了如何利用XMLHttpRequest对象发送POST请求,并设置了请求头来指定数据格式为application/x-www-form-urlencoded。通过构造字符串参数argcontent,实现了向指定Servlet_URL传递多参数。
110

被折叠的 条评论
为什么被折叠?



