ajax
beforeSend
is called before the request is sent, and is passed theXMLHttpRequest
object as a parameter.error
is called if the request fails. It is passed theXMLHttpRequest
, a string indicating the error type, and an exception object if applicable.dataFilter
is called on success. It is passed the returned data and the value ofdataType
, and must return the (possibly altered) data to pass on tosuccess
.success
is called if the request succeeds. It is passed the returned data, a string containing the success code, and theXMLHttpRequest
object.complete
is called when the request finishes, whether in failure or success. It is passed theXMLHttpRequest
object, as well as a string containing the success or error code.
beforeSend 는 서버로 요청을 보내기전 호출됩니다.
error는 호출에 실패하였을때 호출됩니다.
dataFilter 는 ajax를 호출할때 파라미터로 dataType이라는것을 넘겨주게 되는데 이값을 검사하여 호출됩니다.
success 는 서버에서 데이터를 잘 받았을때 호출됩니다.
complate는 성공이나 실패가나더라도.. 요청이 완료된 상태에서 호출이 됩니다.
댓글
댓글 쓰기
질문이나 의견은 요기에 남겨주세요 ^^,,