- xmlhttp.open("post",url,true);
- xmlhttp.send(url);
- (2)用get的话一般就是:
- xmlhttp.open("get",url,true);
- xmlhttp.send(null);
本文介绍了如何使用XMLHttpRequest进行POST和GET请求的基本方法。对于POST请求,使用xmlhttp.open('post', url, true)初始化,然后通过xmlhttp.send(url)发送;而对于GET请求,则使用xmlhttp.open('get', url, true)初始化,并且 xmlhttp.send(null)来发送。
转载于:https://my.oschina.net/u/3291736/blog/843841

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