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 跨域标示。

原文地址:https://www.cnblogs.com/jonney-wang/p/9418974.html