考虑以下:
<div onclick="alert('you clicked the header')" class="header"> <span onclick="alert('you clicked inside the header');">something inside the header</span> </div>
如何才能使用户点击跨度时,它不会触发div点击事件?
div
html javascript events dom
dom ×1
events ×1
html ×1
javascript ×1