欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

解析ajax事件的调用顺序_PHP教程

程序员文章站 2022-04-22 16:50:14
...
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(全局事件)

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/327603.htmlTechArticlejquery的ajax请求方法: 复制代码 代码如下: $.ajax({ type: "GET", dateType:"html", url: "index.html", error: function(msg) { alert("error"); }, complete: function(msg)...