1-1 什么是ajax

  1. 1.客户端向服务器获取数据的一种技术
  2. 2.一种在无需重新加载整个网页的情况下,能够局部更新网页的技术

1-2 同步和异步

  1. 同步:客户端向服务器端发送请求时,用户不能进行其他操作
  2. 异步:客户端向服务器端发送请求时,用户可以进行其他操作
  3. 涉及到对资源的操作都是异步的

1-3 定时器的异步场景

  1. <script>
  2. console.log(1);
  3. setTimeout(()=>{
  4. console.log("http")
  5. },1000)
  6. console.log(2);
  7. </script>