标签:on() bsp div style turn window set pre 练习
1 var name = "window"; 2 var foo = { 3 name: "hello", 4 setName:function(){ 5 return function(){ 6 return this.name; 7 }; 8 } 9 }; 10 alert(foo.setName()()); 11 // window
1 var name = "window"; 2 var foo = { 3 name: "hello", 4 setName:function(){ 5 var that = this; 6 return function(){ 7 return that.name; 8 }; 9 } 10 }; 11 alert(foo.setName()()); 12 //hello
标签:on() bsp div style turn window set pre 练习
原文地址:http://www.cnblogs.com/facous/p/6034229.html