8-1 get

  1. $.get(url,res=>{
  2. console.log(res)
  3. })
  4. $.get(url).then(res=>{
  5. console.log(res)
  6. })

8-2 $.ajax

  1. $.ajax({
  2. url,
  3. type:"get",
  4. data, // get传值问号后面的值,可以放在data属性里面
  5. dataType,
  6. success:res=>{
  7. console.log(res);
  8. }
  9. })