Like alert each one or print to console. How to open a directory. Regular selection based on element attribute values (for comparison): XPath selection based on text within element. How did the notion of rigour in Euclids time differ from that in the 1920 revolution of Math? For example: But ofcourse it will not work. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Internet Explorer: No support. Jan 6, 2020 at 12:34. You could use this pretty simple solution: The Array.from will convert the NodeList to an array (there are multiple methods to do this like the spread operator or slice). Text node: https://developer.mozilla.org/en-US/docs/Web/API/Text. The querySelector () method returns the first element that matches a CSS selector. Change the text of the first
element in a
element with class="example" in a