javascript find queryselector code example
Example 1: queryselector
var el = document.querySelector(".myclass");
Example 2: javascript queryselector
//Pretend there is a <p> with class "example"
const myParagraph = document.querySelector('.example');
//You can do many this with is
myParagraph.textContent = 'This is my new text';
Example 3: dom queryselector
// TO select all the h1 from Html
document.querySelectorAll("h1")
//To select h1 from a particular class or id
document.querySelector(".className/#id h1")