Ajax's Post Method

来源:互联网 发布:淘宝 历年交易额 编辑:程序博客网 时间:2024/06/01 09:05

 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);