AJAX
2017-02-11 本文已影响0人
张荔枝
XMLHttpRequest发送请求
-
open(method,url,async)
-
send(string)
代码演示!
request.open("GET","get.php",true);
request.send();
request.open("POST","post.php",true);
request.send();
requset.open("POST","create.php",true);
request.setRequestHeader("Content-type","application/x-www-form-rulencoded");
request.send("name=王二狗&sex=男");