Wednesday, October 9, 2013

DOM in Javascript

  • DOM Abbreviated as Document Object Model.
  • It’s a Platform and Language API(Application Programming Interface) which allows programs to access andupdate the content, Structure, and Style of a document.
  • We can Say JVM(Java virtual Machine) for Java. DOM is for UI(HTML, CSS, Javascript etc).
  • DOM represents a document as a tree structure. The tree made up of parent-child relationship.
  • parent-child relationship means a parent can have one or more children nodes.

  • Example:

    DOM Structure:
    • DOM Structure
    • In the above picture we have two child node’s for HTML. 1. Title and 2. Body.
    • For head we have one child which is title. For title we have child “title text” which we say text node.
    • For body we have one child which is ”content text” it’s a text node.
    HTML tags are Element node in DOM tree, Pieces of text become text nodes. Both of them are nodes Just the type is different.

0 comments :

Post a Comment

0 comments :

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Powered by Blogger