Ajax学习——GET和POST请求(jQuery中的实现方式)(二)

时间:2019-10-22 15:11:35   收藏:0   阅读:94

Get和POST请求

$.ajax()发送get和post请求的方式。

$.ajax({
  type: ,  //请求方式
  url: ,   //请求的接口地址
  data: ,    //请求参数:data是一个对象
  success: function(res){
  //请求成功后执行的函数
  }
})
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!