Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Selector All Element querySelector Method

 const p =  document.querySelectorAll("p");
 console.log(p[1].innerHTML);
/*second*/

 <p>first</p>
 <p>second</p>
 <p>third</p>
 <p>fourth</p>
 
PREVIOUS NEXT
Tagged: #Selector #All #Element #querySelector #Method
ADD COMMENT
Topic
Name
1+6 =