jquery的ajax请求方法:
$.ajax({
type: \"GET\",
dateType:\"html\",
url: \"index.html\",
error: function(msg) { alert(\"error\"); },
complete: function(msg) { alert(\"complete\"); },
success: function(msg) { alert(\"success\"); }
});
jquery中各个事件执行顺序如下:
1.ajaxStart(全局事件)
2.beforeSend
3.ajaxSend(全局事件)
4.success
5.ajaxSuccess(全局事件)
6.error
7.ajaxError (全局事件)
8.complete
9.ajaxComplete(全局事件)
10.ajaxStop(全局事件)
本文地址:https://www.stayed.cn/item/2703
转载请注明出处。
本站部分内容来源于网络,如侵犯到您的权益,请 联系我