luoluo-snow

1.创建XMLHttpRequest

let xhr=new XMLHttpRequest;

2.连接服务器

xhr.open("get","goods.json",true)

true代表异步,false代表同步。goods.json代表请求的路径

3.向服务器发送请求

xhr.send()

4.接受服务器响应的数据

ajax的作用:向http服务器发送请求,并可以接收到http服务器响应的数据

分类:

技术点:

相关文章:

  • 2021-11-23
  • 2021-08-09
  • 2021-04-13
  • 2021-06-02
  • 2021-11-23
  • 2021-09-17
  • 2021-11-27
  • 2021-12-12
猜你喜欢
  • 2021-12-13
  • 2021-08-11
  • 2021-11-23
  • 2021-06-20
  • 2021-11-23
  • 2021-11-19
  • 2021-11-23
  • 2021-11-23
相关资源
相似解决方案