jQuery ajax async

jQuery 同步调用:

1 jQuery.ajax({
2     type:'POST',
3     async: false,
4     url:'qcTask/add',
5     contentType:'application/json;charset=UTF-8',
6     crossDomain:true,
7     dataType:'json',
8     data: JSON.stringify(param)
9 });

crossDomain 设置为true,提交的头信息上就不会加 X-Requested-With 跨域标示。

 

posted on 2018-08-04 16:20  jonney_wang  阅读(115)  评论(0编辑  收藏  举报

导航