HTML DOM isEqualNode() Method
The HTML DOM isEqualNode() method checks whether the two nodes are equal or not. These nodes are considered equal if they are of the same type, having the same characteristics and the same attributes. The attributes do not have to be in the same order.
Parameters: The “othernode” parameter is required in this function. It is the node that will be compared.
Return Value: Returns a Boolean value, if matches then True else False.
Example: In this example, we will check if the three div elements are equal or not by using the HTML DOM isEqualNode() Method.
We have a complete list of HTML DOM methods, to check those please go through this HTML DOM Object Complete reference article.
Supported Browsers: The browser supported by DOM isEqualNode() Method are listed below:
- Google Chrome 1
- Edge 12
- Firefox 1
- Opera 12.1
- Internet Explorer 9
- Safari 3
Please Login to comment...