<!DOCTYPE html>
<html lang="en-US">
<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>
<p>Click on the following button to display the title of the author preferred StyleSheetSet.</p>
<button onclick="myFunction()">Click Me</button>
<p id="point"></p>
<p><strong>Note</strong>: The author preferred StyleSheetSet. determined from the order of style sheet declarations</p>
<script>
var x = document.getElementById("point");
document.enableStyleSheetsForSet("green");
function myFunction(){
var sheets = document.preferredStyleSheetSet;
x.innerHTML = sheets;
}
</script> </body>
</html>