给所有标签绑定一个方法
文章目录
想的有点多
HTMLElement.prototype.AlertClick = function(){console.log(this)}
document.body.addEventListener("click",function(event){
event.target.AlertClick();
},false)
想的有点多
HTMLElement.prototype.AlertClick = function(){console.log(this)}
document.body.addEventListener("click",function(event){
event.target.AlertClick();
},false)
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论