/[suikacvs]/www/test/dom/style-sheet/css-rules/css-rules-4.html
Suika

Contents of /www/test/dom/style-sheet/css-rules/css-rules-4.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Sun Jan 22 02:32:20 2012 UTC (13 years, 5 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/html
Current

1 wakaba 1.1 <!DOCTYPE html>
2     <html lang="en">
3     <head>
4     <title>&lt;style> CSSStyleSheet.cssRules</title>
5     <style type="text/css">
6     @import '../../../support/sleep10.css';
7     #test-style-1 {
8     color: blue;
9     }
10     #test-style-2 {
11     color: green;
12     }
13     </style>
14     <script src="../../../support/result0.js"></script>
15     </head>
16     <body>
17    
18     <p><code><var>CSSStyleSheet</var> /* <code>&lt;style></code
19     > */ .cssRules.length</code> =
20     <script type="text/javascript">
21     var ds = document.styleSheets[0];
22     writeResult (ds.cssRules.length);
23     </script></p>
24    
25     <ol>
26     <script type="text/javascript">
27     var ds = document.styleSheets[0];
28     var rules = ds.cssRules;
29     var rulesL = rules.length;
30     for (var i = 0; i < rulesL; i++) {
31     var rule = rules[i];
32     document.write ('<li>');
33     writeResult (rule);
34     document.write ('</li>');
35     }
36     </script>
37     </ol>
38    
39     </body>
40     </html>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24