2013年8月24日
摘要: this对象整理下思路:一般用到this中的情景:1.构造方法中function A(){ this.name="yinshen"; }var a=new A();console.log(a.name);this指向new出来的对象实例2.json对象中方法:var obj={ name:"yinshen", getName:function(){ return this.name; }}this指向obj本身3.通过apply或call方法改变方法本身作用域对象function a(){ return this.name; }var b={name:& 阅读全文
posted @ 2013-08-24 00:26 西瓜SY 阅读(328) 评论(0) 推荐(0) 编辑