this获取点击事件的位置
在事件里面,this代表的是事件源
由谁来触发,this就是谁
<body>
<button>this</button>
<script>
var button=document.getElementsByTagName("button")[0];
console.log(button);
button.onclick=function(){
alert("我的名字叫卡卡西");
console.log(this);
console.log(this.innerHTML);
}
</script>
</body
<button>this</button>
<button>this</button>
this