Get请求: url?username=alex&pwd=123

POST请求:

设置请求头:

xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset-UTF-8")
xhr.send("k1=V1;K2=V2");


var form=new FormData()对象;

form.append("user',"alex");
form.append("pwd","123");
xhr.send(form);