chenlulu1122

1.
$ob加载数据
$ob.load(url,data,function(d,status){ })

 


2.
$.get(url,data,callback,type)

 

3.
$.post(url,data,callback,type)

实例:
$.post(\'/demo02\', data,
function (d) {
console.log(d)
$(\'#tip\').text(d)
},
\'json\')


4.$.ajax({})


实例:
$.ajax({url: \'/demo02\',
type: \'post\',
data: data,
dataType: \'json\',
success: function (d) {
$(\'#tip\').text(d)
console.log(d)
}
})


jquery 的跨域
代码:
$.ajax({
url:\'xxx\',
type:\'get\',
dataType:\'jsonp\',//指定为跨域访问
jsonp:\'callback\',//定义了了callback的参数名,以便便获取callback传递过去的函数名
jsonpCallback:\'xxx\' //定义jsonp的回调函数名
});

 

 

分类:

技术点:

相关文章:

  • 2021-10-26
  • 2021-09-27
  • 2021-11-03
  • 2021-09-27
  • 2021-12-31
  • 2021-08-13
  • 2021-09-08
  • 2021-11-04
猜你喜欢
  • 2021-09-15
  • 2021-12-16
  • 2021-10-14
  • 2021-12-16
  • 2020-04-21
  • 2021-12-16
  • 2021-12-16
相关资源
相似解决方案