English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The ajaxSend() method specifies the function to be executed before sending an Ajax request. This is an AjaxEvent.
When an Ajax request is about to be sent, jQuery triggers the ajaxSend event. At this time, all handlers registered with the ajaxSend() method will be executed.
Note:From jQuery 1.8Since version, this method should only be attached to the document.
$(document).ajaxSend(function(event, xhr, options))
Display a message before sending an Ajax request:
$(document).ajaxSend(function(event, xhr, options){ alert("Requesting: " + options.url); });Test See‹/›
Parameters | Description |
---|---|
function(event, xhr, options) | Specify a function to be executed before the Ajax request is sent Parameters:
|