Search This Blog

Saturday, October 6, 2018

Working with DOM (Document Object Method) JavsScript

Each element in the DOM has a set of properties and methods that provide information about their relationships in the DOM:

element.childNodes returns an array of an element's child nodes.
element.firstChild returns the first child node of an element.
element.lastChild returns the last child node of an element.
element.hasChildNodes returns true if an element has any child nodes, otherwise false.
element.nextSibling returns the next node at the same tree level.
element.previousSibling returns the previous node at the same tree level.
element.parentNode returns the parent node of an element.

No comments:

Post a Comment

Create a Form Using Python for Save Data into Excel like a Database

#Download Pyhton from here https://www.python.org/downloads/  #Download Python: #Click the “Download Python 3.x.x” button (the latest versio...