asynchronous javascript and xml
建立连接
request.open(method,url,async,username,password)
method:get,post,put。。。。基本只用get,post
url:请求地址
async:默认true,false。true为异步
username,password:服务器开设的请求账号密码。
发送数据
request.send(data)
get方式接受数据,
request.getParameter("xxx");
post方式,
发送方式1
request.open("post",url)
request.setRequestHeader("ContentType","application/x-www-urlencoded")
request.send("username=nisir&password=aaa");
接受方式1
request.getParameter("username")