jQuery API | jQuery API 中英文对照版 |
ajaxSend(callback) |
ajaxSend(callback)
绑定一个Ajax请求发送时执行的函数。 返回值:jQuery 参数:
示例: AJAX请求发送时显示一条信息 ("#msg").ajaxSend(function(request, settings){ $(this).append("<li>Starting request at " + settings.url + "</li>"); }); Attach a function to be executed before an AJAX request is sent. The XMLHttpRequest and settings used for that request are passed as arguments to the callback. Return value: jQuery
Example: Show a message before an AJAX request is sent. $("#msg").ajaxSend(function(request, settings){ $(this).append("<li>Starting request at " + settings.url + "</li>"); }); |