<!DOCTYPE html>
<html lang="en-US">
<head>
<link rel="stylesheet" title="blue" type="text/css" href="/blue.css">
<link rel="stylesheet" title="green" type="text/css" href="/green.css">
</head>
<body>
<p>Click on the button to count the number of Rules used in "blue.css"</p>
<button onclick="myFunction()">Click Me</button>
<p id="point"></p>
<script>
var x = document.getElementById("point");
function myFunction(){
x.innerHTML = document.styleSheets[0].cssRules.length;
}
</script>
<p><strong>Note</strong>: The CSS files used in the following examples are <a href="/blue.css" target="_blank">blue.css</a> and <a href="/green.css" target="_blank">green.css</a></p> </body>
</html>