JS ajax同步异步设置

//设置ajax为同步
$.ajaxSettings.async = false;
$.post("/test1",function (resp) {
});
$.post("/test2",function (resp) {
//设置ajax为异步
$.ajaxSettings.async = true;
});

你可能感兴趣的:(js,js,ajax,$.post)