摘要: var ss = { aa:"a", bb:this.a, cc:function(){ console.log(this.aa); }}ss.cc();//aconsole.log(ss.bb);//undefine//这个为什么,有时间在研究 阅读全文
posted @ 2016-12-06 23:21 飘然离去 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 转载:http://www.cnblogs.com/xjser/p/4962821.html 阅读全文
posted @ 2016-12-06 19:06 飘然离去 阅读(128) 评论(0) 推荐(0) 编辑
摘要: var aa ={ name:"boy", age:12, like: function(){ console.log(this.name); } } //aa.like();//这样子调用永远不会有this报错的问题。 function box(){ return function(){ aa.like(); } } //box()();//这样子也不会... 阅读全文
posted @ 2016-12-06 18:07 飘然离去 阅读(303) 评论(0) 推荐(0) 编辑