qq_25136829
qq_25136829
采纳率100%
2015-01-07 08:51 阅读 2.8k
已采纳

ajax的八种callback分别是什么意思?

callback的返回函数,onSuccess是返回成功的意思,onFailure是返回失败的意思,
onLoading是返回加载时的要做的事情,onLoaded是返回加载后时要做的事情,那其他的是什么意思呢? 请教大神,如果之前这四个有问题的也请大神解答

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

3条回答 默认 最新

  • 已采纳
    bdmh bdmh 2015-01-07 08:59

    0: (Uninitialized) the send( ) method has not yet been invoked.

    3: (Interactive) the response is being parsed.

    4: (Completed) the response has been parsed, is ready for harvesting.

    0 - (未初始化)还没有调用send()方法

    3 - (交互)正在解析响应内容

    4 - (完成)响应内容解析完成,可以在客户端调用了

    点赞 评论 复制链接分享
  • qq_25136829 qq_25136829 2015-01-07 09:05

    thank you very much

    点赞 评论 复制链接分享
  • showbo GoCityPass新加坡曼谷通票 2015-01-07 09:28

    ajax就5种状态,不知道你哪来的8种。那些个onLoadSuccess都是插件依据底层ajax的状态生成的
    0: (Uninitialized) the send( ) method has not yet been invoked.
    1: (Loading) the send( ) method has been invoked, request in progress.
    2: (Loaded) the send( ) method has completed, entire response received.
    3: (Interactive) the response is being parsed.
    4: (Completed) the response has been parsed, is ready for harvesting.

    0 - (未初始化)还没有调用send()方法
    1 - (载入)已调用send()方法,正在发送请求
    2 - (载入完成)send()方法执行完成,已经接收到全部响应内容
    3 - (交互)正在解析响应内容
    4 - (完成)响应内容解析完成,可以在客户端调用了

    点赞 评论 复制链接分享

相关推荐