As an example, when interactions with class identifiers may be needed, this is the creation of a component for Checkbox in which the change of picture may occur due to the change of the class identifier from unchecked to checked and vice versa.
Getting components by class identifier
As already described earlier, an identifier is used to access a component. But the component can be obtained by the class identifier, but with some caveats.
Since several components can have the same class identifier, a collection of components with the given class identifier will be returned.
To get the collection, use the getElementsByClassName method: