标签:tar app name nod code innerhtml create cli func
1 // js事件委托 2 document.getElementById(‘test‘).addEventListener(‘click‘,function(event){ 3 let target = event.target; 4 if(target.nodeName == ‘LI‘){ 5 console.log(target.innerHTML) 6 } 7 }) 8 let six = document.createElement(‘li‘); 9 six.innerText = ‘6‘ 10 document.getElementById(‘test‘).appendChild(six)
标签:tar app name nod code innerhtml create cli func
原文地址:https://www.cnblogs.com/StruggleStudyhard/p/8941975.html