Web HTMLStyleElement API | StyleElement type property
In Web API there are style elements which have a type attribute. To fetch this type attribute we use HTMLStyleElement.type property, which returns the type of the current style.
getType = style.type;
Example: get the type attribute.
Click the button:
When the button is clicked:
- Google Chrome
- Edge 12