jQuery ajaxStart() 方法

jQuery 教程 · 2019-03-28 15:59:06

实例

当 AJAX 请求开始时,显示 "loading" 的指示:

$(document).ajaxStart(function(){ $(this).html("<img src='demo_wait.gif' />"); });

定义和用法

ajaxStart() 方法规定 AJAX 请求开始时运行的函数。

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

语法

$(document).ajaxStart(function())

参数 描述
function() 必需。规定当 AJAX 请求开始时运行的函数。

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

查看所有标签

Invisible Users

Invisible Users

Jenna Burrell / The MIT Press / 2012-5-4 / USD 36.00

The urban youth frequenting the Internet cafes of Accra, Ghana, who are decidedly not members of their country's elite, use the Internet largely as a way to orchestrate encounters across distance and ......一起来看看 《Invisible Users》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

html转js在线工具
html转js在线工具

html转js在线工具