dom中的this
指的是对象本身 例如
函数中的this
function test(){/// this指的是方法对象 方法转成对象 属性和值 this.name='张三';//对象 this.aa=function(){ alert('对象里面的方法'); } } var t=new test(); alert(t.age);*/ //test().;
对象中的this
var obj={name:'张三',tt:function(){ alert(this.name) }}; obj.tt();*/