What arguments are supplied to the function inside an ajax .done?

后端 未结 3 1679
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-02 08:12

I have the following:

    $.ajax(link.href,
    {
        cache: false,
        dataType: \'html\'
    })
        .done(onDialogDone)
        .fail(onDialogFail)         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-02 09:08

    The three parameters passed to the done handler are:

    data, textStatus, jqXHR
    

    You can read more here: http://api.jquery.com/jQuery.ajax/

    1. data is the response message
    2. textStatus will always be success in the done function
    3. jqXHR is the raw XMLHttpRequest

提交回复
热议问题