javascript闭包[两个小测试例子] <script>var name = "The Window";var Object_a = { name : "My Object", getNameFunc : function(){ return function(){ return this.name; }; }};alert(Object_a.getNameFunc()());</script>
?
结果:The Window