JavaScript document.enableStyleSheetsForSet() Method

You are Here:

JavaScript document.enableStyleSheetsForSet() Method

The document.enableStyleSheetsForSet() method enables the style sheets matching the specified name in the current style sheet set, and disables all other style sheets.

Note: StyleSheets with no title attribute are always enabled.

Note: This method works only on firefox.


HTML Online Editor
<!DOCTYPE html> <html> <head> <link rel="stylesheet" title="red" type="text/css" href="red.css"> <link rel="stylesheet" title="green" type="text/css" href="green.css"> </head> <body> <p>This example will work only on Firefox</p> <script> // try to change "red" to "green" document.enableStyleSheetsForSet("red"); </script> </body> </html>



Parameter Values

nameRequiredSpecifies the name of the style sheets to enable.


Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in JavaScript.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author