Answers for "how to get all the divs in page in node js"

0

how to get all the divs in page in node js

// Get the element with id="myDIV" (a div), then get all elements inside div with class="example"
var x = document.getElementById("myDIV").querySelectorAll(".example");  


 // Set the background color of the first element with class="example" (index 0) in div

 x[0].style.backgroundColor = "red"; 
Posted by: Guest on May-26-2021

Code answers related to "how to get all the divs in page in node js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language