0

hi, everyone
i would like to learn more about parentnode and childnode (with exaplanation) with the tutorials
The reason i am beginner i dont understand this properties
does anyone help

3
Contributors
3
Replies
5
Views
7 Years
Discussion Span
Last Post by Airshow
0

Well an HTML page is laid out like a tree.

/*
        HEAD
         |
        BODY
          \
           DIV  <-- SPAN's parent node
            \
            SPAN
            /  \
          A   IMG <-- SPAN's child nodes

Each point in the tree is called a Node. The Node directly above another in the tree is its parent (just like a family tree). Any node directly below another is a child

0

thank you very much
i understood
but i would like to see it a live example
if possible

1

First, you must understand HTML/XHTML and Javascript. Otherwise you will be trying to run before you can walk.

Then, get your mind round the fact the the Document Object Model (DOM) is a tree structure and learn a few special Javascript commands to address and manipulate the DOM.

There's little point posting examples here as there are several online tutorials which do a much better job. This is one from W3Schools, or stick "DOM Tutorial" or similar into Google.

Airshow

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.