document.onclick=function(e){ var e=e||window.event; var tg=e.target||e.srcElement; alert("你点击的标签名称为:"+tg.tagName);}