📅  最后修改于: 2022-03-11 15:03:04.533000             🧑  作者: Mango
function clickOrigin(e){
var target = e.target;
var tag = [];
tag.tagType = target.tagName.toLowerCase();
tag.tagClass = target.className.split(' ');
tag.id = target.id;
tag.parent = target.parentNode.tagName.toLowerCase();
return tag;
}
var tagsToIdentify = ['img','a'];
document.body.onclick = function(e){
elem = clickOrigin(e);
for (i=0;i