var name = "The Window"; var object = {name : "My Object",
getNameFunc : function(){
return function(){
return this.name;
};
},
getName:function(){
alert(this.name);
}}; alert(object.getNameFunc()()); //The Windowobject.getName(); //My Object
添加回答
举报
0/150
提交
取消