Dom (document object model) is a programming interface that allows javascript to interact with html and xml file.
It represents the document as a tree of objects where each node represents to an element in the document.
Javascript can access modify and manipulate the content amd structure of a web page using DOM.
DOM method and properties allows you to manipulate elements, attributes and styles add or remove
elements and handel events.
Methods:
In javascript methods are function associated with objects.
Node: its an individual part of elements in the dom tree
DOM Properties:
Thu
1)document:
2) child
3) children
4) firstElementChild
5) lastElementChild
6) childElementCount
7) childNodes
Type of selector:
1) Single:
a) getElementById
b) querySelector
2) Multiple:
a) getElementsByTagName
b) getElementsByClassName
C) getElementsByName
d) querySelectorAll

0 Comments