Skip to content
Advertisements

Category: javascript

DOM parentNode()

DOM parentNode()

The HTML DOM parentNode() method returns a parent node of the specified node as the Node object.

DOM hasChildNodes

DOM hasChildNodes

The hasChildNodes () method returns true if the specified node has any child nodes.

DOM Attribute

DOM Attribute

As we create HTML elements in JavaScript, we can create and delete their attributes.

hasAttribute

DOM hasAttribute ()

The hasAttribute () method returns true if the specified attribute exists, otherwise false.