Let's talk about changing text, html content, and attributes with the DOM
To Edit Styles, we've already seen we can use the .style tag.
Now if we want to edit actual html or text or
attributes we can use different methods.
If you want to change the text,html content, or attributes you can use the following:
- myvariable.textContent - This returns just the text
- myvariable.innerHTML - This returns the actual html
- myvariable.getAttribute() - This returns the original attribute
- myvariable.setAttribute() - This allowed you to set an attribute
I am another header with the special id.
FACEBOOK LINK