Can anyone help me?
I am not able to understand the difference between success
and .done()
of $.ajax
.
If possible please give examples.
Can anyone help me?
I am not able to understand the difference between success
and .done()
of $.ajax
.
If possible please give examples.
简而言之,将成功回调函数与Ajax函数解耦,这样以后您就可以添加自己的处理程序,而无需修改原始代码(观察者模式).
请从这里查找更多详细信息:https://stackoverflow.com/a/14754681/1049184