题目1
var name = "The Window";
var object = {
name : "My Object",
getNameFunc : function(){
return function(){
return this.name;
};
}
};
alert(object.getNameFunc()());
答案:The Window
题目2
var name = "The Window";
var object = {
name : "My Object",
getNameFunc : function(){
var that = this;
return function(){
return that.name;
};
}
};
alert(object.getNameFunc()());
答案:My Object
解释下
_名字很奇怪3801458
_游戏人生_
橋本奈奈未
RuthlessPotato丶
慕的地6079101
相关分类