复制代码 代码如下:
$.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(全局事件)
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!