当 AJAX 请求即将发送时,改变 div 元素的内容:
</>code
- $("div").ajaxSend(function(e,xhr,opt){
- $(this).html("Requesting " + opt.url);
- });
ajaxSend() 方法在 AJAX 请求开始时执行函数。它是一个 Ajax 事件。
</>code
- .ajaxSend([function(event,xhr,options)])
参数 | 描述 |
---|---|
function(event,xhr,options) |
必需。规定当请求开始时执行函数。 额外的参数:
|
XMLHttpRequest 对象和设置作为参数传递给回调函数。
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛