/[suikacvs]/www/test/dom/xpath/html/function-local-name-attr-3.html
Suika

Contents of /www/test/dom/xpath/html/function-local-name-attr-3.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Wed Feb 14 09:53:34 2007 UTC (18 years, 5 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/html
New tests

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24