<ul>
<li><img src="img/remind.png" alt=""></li>
<li><img src="img/remind.png" alt=""></li>
<li><img src="img/remind.png" alt=""></li>
</ul>
I click on the event to bind to ul, want to delegate to li, and then judge by whether the tagName of e.target is LI. The problem is that li also contains other elements. For example, there is a picture in my li. When clicked, its e.target is img, so the event will not be executed. How can the event be accurately delegated to li? img is just an example, or li will have a more complex structure. At this time, how to avoid the child elements in li to delegate?
A stupid way I used before is to give li a fully covered pseudo element, but I don"t think that"s a good idea