<ul>
<li>
<div class="li-litm"><span class="span1">1111111111111</span></div>
</li>
<li>
<div class="li-litm"><span>222222222222222</span></div>
</li>
<li>
<div class="li-litm"><span>3333333333333333</span></div>
</li>
</ul>
function getNode(node, targetName, rootName) {
if(node.nodeName.toLowerCase() === rootName){
return false
}else if (node.nodeName === targetName) {
return node;
} else {
return getNode(node.parentNode, rootName);
}
}
document.querySelector('ul').onclick = function(e) {
var e = e || window.event;
var target = e.target || e.srcElement
target = getNode(target,'LI','UL')
target.nodeName === 'LI' ? alert('点击了li') : alert('点击了ul')
}