题解 | #事件委托#
事件委托
https://www.nowcoder.com/practice/02866b3ce7f8420c8b5d22f483c5fcc0
<!DOCTYPE html> <html> <head> <meta charset=utf-8> </head> <body> <ul> <li>.</li> <li>.</li> <li>.</li> </ul> <script type="text/javascript"> // 补全代码 document.getElementsByTagName('ul')[0].onclick=(el)=>{ el.target.innerText='..' } </script> </body> </html>