jQuery ajaxStop() 方法

jQuery 教程 · 2019-03-28 16:16:55

实例

当所有 AJAX 请求完成时,触发一个提示框:

$(document).ajaxStop(function(){ alert("所有 AJAX 请求已完成"); });

定义和用法

ajaxStop() 方法规定所有的 AJAX 请求完成时运行的函数。

当 AJAX 请求完成时,jQuery 会检查是否存在更多的 AJAX 请求。如果没有其他请求正在等待运行,ajaxStop()方法会运行指定的函数。

注意:自 jQuery 版本 1.8 起,该方法只被附加到文档。

语法

$(document).ajaxStop(function())

参数 描述
function() 必需。规定所有的 AJAX 请求完成时运行的函数。

点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html

查看所有标签

Learn Python 3 the Hard Way

Learn Python 3 the Hard Way

Zed A. Shaw / Addison / 2017-7-7 / USD 30.74

You Will Learn Python 3! Zed Shaw has perfected the world’s best system for learning Python 3. Follow it and you will succeed—just like the millions of beginners Zed has taught to date! You bring t......一起来看看 《Learn Python 3 the Hard Way》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具