Example:
<div > ... </div>
<div > ... </div>
const soleParentClassElementList = document.querySelectorAll('.parent')
With the above code line I would query both element nodes, but I want to query just the one(s) with a single parent
class.
CodePudding user response:
this way...
document
.querySelectorAll('[]')
.forEach(node => node.textContent = 'this one');
<div > ... </div>
<div > ... </div>