jQuery ajaxComplete() 方法
jQuery 教程
· 2019-03-28 14:57:27
实例
当 AJAX 请求正在进行时显示 "loading" 的指示:
$(document).ajaxStart(function(){
$("#wait").css("display","block");
});
$(document).ajaxComplete(function(){
$("#wait").css("display","none");
});
定义和用法
ajaxComplete() 方法规定 AJAX 请求完成时运行的函数。
注意:自 jQuery 版本 1.8 起,该方法只被附加到文档。
不像 ajaxSuccess(),通过 ajaxComplete() 方法规定的函数将在请求完成时运行,即使请求并未成功。
语法
$(document).ajaxComplete(function(event,xhr,options))
| 参数 | 描述 |
|---|---|
| function(event,xhr,options) |
必需。规定当请求完成时运行的函数。 额外的参数:
|
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
The Shallows
Nicholas Carr / W. W. Norton & Company / 2010-6-15 / USD 26.95
"Is Google making us stupid?" When Nicholas Carr posed that question, in a celebrated Atlantic Monthly cover story, he tapped into a well of anxiety about how the Internet is changing us. He also crys......一起来看看 《The Shallows》 这本书的介绍吧!