DOM Manipulation Methods in JavaScript
DOM Manipulation Methods in JavaScript
@_codevalley
Zuhaib Asif
@_codevalley Zuhaib Asif
innerHTML:
It is used to gets or sets the HTML content
within an element.
innerText:
It is used to gets or sets the text content
within an element.
textContent:
It is similar to innerText, gets or sets the text
content within an element.
setAttribute(name, value):
It is used to sets the value of an attribute on
an element.
removeAttribute(name):
It is used to removes a specified attribute
from an element.
style:
It is used to access or modifies the inline
styles of an element.
classList:
It is used to manipulates the classes of an
element.