题解 | #阻止冒泡事件#
阻止冒泡事件
https://www.nowcoder.com/practice/1c12ccea98b049078d2cd3ef39269856
// 补全代码 document.getElementsByTagName("li")[0].addEventListener("click",function(event) { event.stopPropagation(); })
阻止冒泡事件
https://www.nowcoder.com/practice/1c12ccea98b049078d2cd3ef39269856
// 补全代码 document.getElementsByTagName("li")[0].addEventListener("click",function(event) { event.stopPropagation(); })
相关推荐