首页 > jQuery defferred对象,resolveWith(context,args)方法,context是什么呢?

jQuery defferred对象,resolveWith(context,args)方法,context是什么呢?

一个解释:
deferred.resolveWith(context,args):调用Deferred对象注册的‘done'回调函数并传递参数和设置回调上下文
参考网址:http://www.jb51.net/article/34525.htm


一般来说,在JS中只要见到 context ,就是指回调函数中的 this,特别是在参数列表中。这里既是指第一个参数传递一个对象,在 done() 回调函数中的 this 指向这个对象。

【热门文章】
【热门文章】