jQuery.post( ) .done( ) and success:

前端 未结 4 1668
孤独总比滥情好
孤独总比滥情好 2020-12-01 03:44

jQuery documentation on jQuery.post( )

// Assign handlers immediately after making the request,
// and remember the jqxhr object fo         


        
4条回答
  •  醉话见心
    2020-12-01 04:05

    From the doc:

    jqXHR.done(function( data, textStatus, jqXHR ) {});

    An alternative construct to the success callback option, the .done() method replaces the deprecated jqXHR.success() method. Refer to deferred.done() for implementation details.

    The point it is just an alternative for success callback option, and jqXHR.success() is deprecated.

提交回复
热议问题