本文介绍了成功和$ .ajax的.done()方法有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以帮助我吗? 我无法理解$.ajax的success和.done()之间的区别.
如果可能,请举例.
解决方案简而言之,将成功回调函数与ajax函数解耦,以便稍后您可以添加自己的处理程序,而无需修改原始代码(观察者模式).
请从此处找到更多详细信息: stackoverflow/a/14754681/1049184
Can anyone help me? I am not able to understand the difference between success and .done() of $.ajax.
If possible please give examples.
解决方案In short, decoupling success callback function from the ajax function so later you can add your own handlers without modifying the original code (observer pattern).
Please find more detailed information from here: stackoverflow/a/14754681/1049184
更多推荐
成功和$ .ajax的.done()方法有什么区别
发布评论