It returns a live HTMLCollection, with the possible length as 0 if no matching elements are found in the document. It returns a null value if no matching element is found in the document. In the case of multiple class names, it can be separated by whitespace. It takes the name which is a string, as a parameter value that represents the class name(s) to match. The getElementsB圜lassName () property is read-only. The getElementsB圜lassName () method returns an HTMLCollection. It accepts the id as a parameter value to locate that specific element. The getElementsB圜lassName () method returns a collection of elements with a specified class name (s). ![]() ![]() This method returns an array-like object of all child-element that contains all the given class name(s) ie., it will return an HtmlCollection – an array-like structure containing the DOM elements that matched the query, that is needed to iterate through each element in the array to apply the style. This method returns an element object that specifies the element for which id property matches with the specified string ie., it returns a single DOM element whose id matches the specific query.
0 Comments
Leave a Reply. |