The _________ method returns all elements in the document with the specified tag name as a NodeList.
- querySelector()
- getElementByTagName()
- getElementsByClassName()
- querySelectorAll()
The getElementByTagName() method returns all elements in the document with the specified tag name as a NodeList. It's important to note that this method is older and less flexible than querySelectorAll(), which can select elements based on more complex criteria.
Loading...
Related Quiz
- Which array method adds elements to the beginning of an array?
- How does the browser determine the path along which the event propagates?
- Which of the following is NOT a type of polymorphism supported by JavaScript?
- When defining a method in an object, the function associated with a property is referred to as a _________.
- How does the "this" keyword behave inside a closure?