var name = "The Window";var object = {
name : "My Object",
getNameFunc : function(){
alert('1.' + this.name); return function(){ return this.name;
};
}
};var func = object.getNameFunc();
alert('2.' + func());
alert('3.' + func.call(object));
alert('4.' + func.apply(object));
函数式编程
随时随地看视频慕课网APP
相关分类