JS DOM: Change HTML element style attribute
Get style
node.style.cssPropertyReturn the property value, or undefined if it doesn't exist.
Set style
-
node.style.cssProperty=value -
- Set CSS property.
- Return value.
- If the property is not a standard CSS property, it's not added.
example JS DOM: Change CSS