/[suikacvs]/www/test/html/entref/character-entity/all-1.html
Suika

Contents of /www/test/html/entref/character-entity/all-1.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Sun Oct 18 08:15:21 2009 UTC (15 years, 9 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/html
were not part of CVS repository

1 wakaba 1.1 <!-- Work in progress -->
2     <html>
3     <head>
4     <title>HTML entities</title>
5     <style>
6     X.non-entity {
7     display: none;
8     }
9     </style>
10     </head>
11     <body>
12     <noscript><p id=result class=FAIL>FAIL (not executed)</p></noscript>
13     <p><button type=button onclick="stopP=true">stop</button></p>
14     <p><iframe></iframe></p>
15     <script>
16     var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-';
17     var stopP = false;
18    
19     var doc = document.getElementsByTagName ('iframe')[0].contentWindow.document;
20    
21     var prefix = [''];
22     p (prefix.shift ());
23    
24     function p (m) {
25     var v = '<table><caption>'+m+'</caption><tbody>';
26     for (var i = 0; i < chars.length; i++) {
27     n = m + chars[i];
28     v += '<tr><td>&amp;'+n+';</td><td>&'+n+';</td></tr>';
29     prefix.push (n);
30     }
31     v += '</tbody></table>';
32     doc.body.innerHTML = v;
33     var trs = doc.getElementsByTagName ('table')[0].tBodies[0].rows;
34     var trsL = trs.length;
35     for (var i = 0; i < trsL; i++) {
36     var tr = trs[i];
37     if (tr.firstChild.innerHTML == tr.lastChild.innerHTML) {
38     tr.className = 'non-entity';
39     }
40     }
41    
42     if (!stopP && prefix.length) {
43     window.setTimeout (function () {
44     p (prefix.shift ());
45     }, 1000);
46     }
47     }
48     </script>
49     </body>
50     </html>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24