给所有标签绑定一个方法

想的有点多

HTMLElement.prototype.AlertClick = function(){console.log(this)}
document.body.addEventListener("click",function(event){
        event.target.AlertClick();
},false)

评论

暂无评论