javascript how to select div code example
Example: js select div
// Select div with class "theDiv"
document.queryselector('.theDiv');
// Select div with ID "theDiv"
document.queryselector('#theDiv');
// Select div with class "theDiv"
document.queryselector('.theDiv');
// Select div with ID "theDiv"
document.queryselector('#theDiv');