내가 설명 내 질문의 네 각 인수를 사용하는 예를 제공하고 answer 유용 얻을 수 있습니다 :
event is an ajaxError event object and doesn't contain any particularly useful information. xhr is the jQuery wrapper around the XMLHttpRequest object that made the request - useful attributes are status and statusText. options is the full set of options sent to the ajax request - useful attributes are url, isLocal, and type. exc is the exception thrown - useful attributes are filename and message, and possibly lineNumber and columnNumber.
$('#results').ajaxError(function(event, xhr, options, exc) {
$(this).text('Couldn\'t load ' + options.url + ' because (' +
xhr.status + ' - ' + xhr.statusText + ') ' + exc.message);
});
을
또한 The Event Object (page 173)
섹션을 JavaScript & jQuery: The Missing Manual, 2nd Edition
섹션으로 공부했습니다. 섹션의 금액은 다음과 같습니다
이벤트 객체 Whenever a web browser fires an event, it records information about the event and stores it in an event object. The event object contains information that was collected when the event occurred, like the vertical and horizontal coordinates of the mouse, the element on which the event occurred, or whether the Shift key was pressed when the event was triggered.
그리고 지금은 이해하지 못했다 무엇인지 알고있다. 그냥 한 가지 :는
는 사람이 나에게 $.ajaxError event(parameter) attributes.
내가 Firebug
과 디버깅 및 event Object
을보고 매우 유용한 정보를 발견 할의 명시 적으로 여러 인스턴스를 줄 수,하지만 난 안돼서 내 기사에 대한 올바른 몇 가지 기능이 필요 약 $.ajaxError parameters.
당신은 자신의 대답을 받아 들일 수 있습니다. 참고로, 그것은 나에게 도움이되었다. –