XMLHttpRequest 发送请求
1)创建Ajax对象
var xhr=new XMLHttpRequest();
2)open(method,url,async)
method:get/post
url:地址
async:是否异步
xhr.open('get','http://www.example.com')
3)xhr.send(string) 发送参数
xhr.send()
4)获取服务器端给与客户端的响应数据
xh...
原创
2019-12-03 13:57:58 ·
214 阅读 ·
0 评论