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
Pragmatic Thinking and Learning
Andy Hunt / The Pragmatic Bookshelf / 2008 / USD 34.95
In this title: together we'll journey together through bits of cognitive and neuroscience, learning and behavioral theory; you'll discover some surprising aspects of how our brains work; and, see how ......一起来看看 《Pragmatic Thinking and Learning》 这本书的介绍吧!