/[suikacvs]/www/test/dom/xpath/html/boolean-attr-value-1.html
Suika

Contents of /www/test/dom/xpath/html/boolean-attr-value-1.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Sat Dec 30 14:53:59 2006 UTC (18 years, 6 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/html
New

1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>DOM3 XPath vs HTML Document</title>
5 </head>
6 <body>
7 <h1>DOM3 XPath vs HTML Document</h1>
8
9 <dl><dt>An element with<em>out</em> <code>compact</code>.</dt></dl>
10
11 <dl compact><dt>An element with <code>compact</code>.</dt></dl>
12
13 <dl compact=""><dt>An element with <code>compact=""</code>.</dt></dl>
14
15 <dl compact="compact"><dt>An element with <code>compact=compact</code>.</dt></dl>
16
17 <p id="status"></p>
18
19 <script type="text/javascript">
20 document.getElementById ('status').appendChild
21 (document.createTextNode ('FAIL'));
22 var nl = document.evaluate ('//*[@compact = "compact"]', document, null,
23 XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
24 for (var i = 0; i < nl.snapshotLength; i++) {
25 nl.snapshotItem (i).style.color = 'blue';
26 }
27 document.getElementById ('status').firstChild.data
28 = '"//*[@compact = "compact"]" elements are colored blue.';
29 </script>
30 <noscript>NOSCRIPT</noscript>
31
32 </body>
33 </html>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24