1.在执行之前加$.ajaxSettings.async = false; (同步执行) 2.当XHR请求状态为200时回调ajax函数 转载于:https://www.cnblogs.com/xiaowuge/p/3666045.html