About 3,520,000 results
Open links in new tab
  1. using document.querySelector to get a value/name from a website

    Feb 28, 2019 · document.querySelector('#container > article:nth-child(1) > div > h1 > a').innerHTML; querySelector returns the first web page element (object) that matches the specified group of …

  2. Select "Text" node using querySelector - Stack Overflow

    Feb 21, 2019 · As already answered, CSS does not provide text node selectors and thus document.querySelector doesn't. However, JavaScript does provide an XPath -parser by the method …

  3. How is document.querySelector implemented? - Stack Overflow

    Jan 13, 2016 · All the information you asked for is in the links you provided: querySelector: Returns the first element within the document (using depth-first pre-order traversal of the document's nodes|by …

  4. javascript - If a selector in a querySelector call matches multiple ...

    Mar 19, 2019 · document.querySelector('.container input, .container').focus(); Funny, though, querySelector always returns the .container element. I started to investigate and came out that, no …

  5. querySelector and querySelectorAll vs getElementsByClassName and ...

    Jan 17, 2013 · I would like to know what exactly is the difference between querySelector and querySelectorAll against getElementsByClassName and getElementById? From this link I could …

  6. jQuery vs document.querySelectorAll - Stack Overflow

    Jul 16, 2012 · However , as far as I know, you can achieve the same result with document.querySelector or document.querySelectorAll, which are supported in Internet Explorer 8 and above. So the question …

  7. How to use querySelector to look up only direct children, without ...

    Jun 14, 2017 · Learn how to use querySelector to target only direct children without selecting further descendants in JavaScript.

  8. How can I use querySelector on to pick an input element by name?

    Mar 1, 2013 · The querySelector method takes a selector argument. The selector argument is a string containing one or more CSS selectors separated by commas. If you ever stuck on valid selectors the …

  9. Use variables in document.querySelector - Stack Overflow

    document.querySelector('.test') or document.getElementsByClassName('test')[0] if you have a class, why would you want to use an unconventional way?

  10. Javascript .querySelector find <div> by innerTEXT

    May 8, 2016 · Document.querySelector() only accepts a valid css selector as argument, so taken literally, mine is the only answer that allows you to find an element by innerText using querySelector. …