Skip to content
Advertisements

Category: javascript lessons

getBoundingClientRect

DOM getBoundingClientRect()

The getBoundingClientRect () method returns the width, height, x and y coordinate, top, bottom, right, and left values ​​of the specified element.

DOM firstChild

DOM firstChild

Returns the first child of the connected node. Returns null if the node does not have a child.

DOM childNodes

DOM childNodes

The element.childNodes property returns an array of subnodes bound to the element node.

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.