Name

disabled — NN n/a IE 4 DOM n/a

Synopsis

Read/Write

Whether rules in the style sheet should be applied to their selected elements. Although the corresponding DISABLED attribute does not work in Internet Explorer 4, setting the disabled property to true does, in fact, turn off the entire style sheet. During page authoring, you can create a button that toggles style sheets on and off to see how the page looks in all types of browsers.

Example

document.styleSheets[0].disabled = true

Value

Boolean value: true | false.

Default

false

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.