TAG
JavaScript
Result
Run
License
<div class="wrapper"> <h2>What is Lorem Ipsum?</h2> <p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </p> </div>
window.addEventListener("load", () => { let aEls = document.querySelectorAll('.wrapper > *'); [...aEls].map(function(item) { item.onclick = function() { console.log(this.tagName); }; }); });
Console
expand_less
License
License
by DevDic
Close