Ask Question

State one similiarity between the returned value of getElementsByTagName () and getElementsByClass ()

+5
Answers (1)
  1. 5 June, 04:01
    0
    The return type of both the methods is a Live HTMLCollection.

    Explanation:

    Both the methods getElementsByClassName () and getElementsByTagName () returns a Live HTMLCollection. Both the methods result in the collection of elements according to the method name. The method getElementsByClassName () results in the elements with the given class name. The method getElementsByTagName () results in the elements with the given Tag name. As stated above both the methods returns HTMLCollection which are live. That means the methods take care of the changing tag names and class names. If there are any updates to the class names and tag names, the list gets updated accordingly.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “State one similiarity between the returned value of getElementsByTagName () and getElementsByClass () ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers