jQuery ajaxSend() 메서드
예시
AJAX 요청이 전송되려고 할 때 <div> 요소의 내용을 변경합니다.
$(document).ajaxSend(function(e, xhr, opt){
$("div").append("<p>Requesting: " + opt.url + "</p>");
});
정의 및 사용
ajaxSend() 메소드는 AJAX 요청이 전송되려고 할 때 실행할 함수를 지정합니다.
참고: jQuery 버전 1.8부터 이 메서드는 문서에만 첨부되어야 합니다.
통사론
$(document).ajaxSend(function(event,xhr,options))
Parameter | Description |
---|---|
function(event,xhr,options) |
Required. Specifies the function to run if the request succeeds Additional parameters:
|