this 1在普通函数中 在普通函数中的this指window 在html中调用this,this指window function fun1(el){ console.log(this,el); } dom1事件注册中,this指事件对象(dom) var dom = document.querySelector('.dom'); dom.onclick = fun2; function fun2(){ console.log(this); } 2对象中的this是对象本身