HTML DOM contains() Method
The contains() method is used to find whether the specified node is a descendant of the given node. This descendant can be a child, grandchild, great-grandchild, and so on. Syntax: node.contains( otherNode ) Parameters: The âothernodeâ in the syntax is the parameter required in this function. Return