概述 JavaScript函数中的三个方法 .call() , .apply() , .bind() ,总体来说主要功能就是改变函数中 this 关键字的指向,因为 this 默认指向 当前环境的对象 ; 例如: var obj = { name : ' Knight ' , getName : function () { // this 指向 obj 对象 console . log ( thi…
概述 JavaScript函数中的三个方法 .call() , .apply() , .bind() ,总体来说主要功能就是改变函数中 this 关键字的指向,因为 this 默认指向 当前环境的对象 ; 例如: var obj = { name : ' Knight ' , getName : function () { // this 指向 obj 对象 console . log ( thi…
讨论
登录后参与讨论
还没有评论,来说第一句吧。