I am not sure what you are asking here, but if the issue is looping through the elements, this is happening because you get a NodeList
back from querySelectorAll
and not an array. Below will let you loop through node elements.
const nodes = document.querySelectorAll('.nodes');
[].forEach.call(nodes, (singleNode) => {
//Whatever you want.
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…