HTML DOM Element contains()
HTML DOM Element contains() Method
The contains() method is used to return true if a node is a descendant of a node else it will return false. The child, grandchild, great-grandchild, and so on are descendants.
Syntax;-
Its syntax is:- node.contains(node)
Return:-
Its return is:- true if the node is descendant else false
Further Explanation:-
Parameter | Description |
node | Required. The node that may be a descendant of the node. |