jQuery ajax ajaxSend() 方法
jQuery ajax ajaxSend() 方法
ajaxSend() 方法在 AJAX 請(qǐng)求開始時(shí)執(zhí)行函數(shù)。它是一個(gè) Ajax 事件。
1. 語法
.ajaxSend([function(event,xhr,options)])
參數(shù) | 描述 |
---|---|
function(event,xhr,options) |
必需。規(guī)定當(dāng)請(qǐng)求開始時(shí)執(zhí)行函數(shù)。 額外的參數(shù):
|
詳細(xì)說明
XMLHttpRequest 對(duì)象和設(shè)置作為參數(shù)傳遞給回調(diào)函數(shù)。
2. 范例
當(dāng) AJAX 請(qǐng)求即將發(fā)送時(shí),改變 div 元素的內(nèi)容:
$("div").ajaxSend(function(e,xhr,opt){ $(this).html("Requesting " + opt.url); });
相關(guān)文章
- jQuery 教程
- jQuery 效果 淡入淡出
- jQuery 停止動(dòng)畫
- jQuery Callback 函數(shù)
- jQuery 獲得內(nèi)容和屬性
- jQuery 設(shè)置內(nèi)容和屬性
- jQuery css() 方法
- jQuery 遍歷
- jQuery 遍歷 祖先
- jQuery 遍歷 兄弟
- jQuery 遍歷 過濾
- jQuery noConflict() 方法
- jQuery 參考手冊(cè) 屬性操作
- jQuery 參考手冊(cè) CSS 操作
- jQuery 事件 pageX 屬性
- jQuery 事件 keydown() 方法
- jQuery 事件 mousedown() 方法
- jQuery 事件 mouseenter() 方法
- jQuery 事件 mousemove() 方法
- jQuery 事件 trigger() 方法