<script>
var name = "The Window";
var setter;
var object = {
name : "My Object",
getNameFunc : function(){
return function(){
return this.name;
};
}
};
alert(object.getNameFunc()());
function t(){
setter=function (){name = "My Object";};
function b(){alert(this.name);}
return b;
}
var object1=t();
object1();
setter();
object1();
function out()
{
name = "My Object";
function inner()
{
alert(this.name);
}
return inner;
}
var result=out();
result();
</script>
时间: 2024-10-10 11:00:06