What are the methods involved in HTML DOM?

What are the methods involved in HTML DOM?



- HTML DOM methods are used as a way to generate the result without much of the written code and it can be easily used.

- HTML DOM provides methods to simplify the tasks and the methods are as follows:

x.getElementById(id) – this allow the getting of the element that is associated with a specified id.
x.getElementsByTagName(name) – this gets all the elements using the tag name that is associated with it.
x.appendChild(node) – this inserts a child node to x and append the child node at the end of the tree.
x.removeChild(node) – this removes a child node from x and remove from the tree area also.
Post your comment