DOM Manipulation
DOM Manipulation
MANIPULATION
#1
Selecting Elements
Change text:
#3
Modifying HTML Content
Change HTML:
#4 Modifying Attributes
Set attribute:
Get attribute:
#5
Modifying Styles
Change style:
Recap and Practice
Select elements: getElementById,
querySelector
Modify text: textContent
Modify HTML: innerHTML
Modify attributes: setAttribute,
getAttribute
Modify styles: style