-2

I have a web page that has many elements that match the querySelector given below;

document.querySelector('div[class="listing-headline"] > a > h3').innerText;

But when I run the above line, it only returns the FIRST matching element. Is there a way to return ALL matching elements?

Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122

1 Answers1

1

Simple Answer:

document.querySelectorAll("[selector]");
Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122