/[suikacvs]/www/test/dom/xpath/html/default-resolver-1.html
Suika

Contents of /www/test/dom/xpath/html/default-resolver-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 <div>A <code>div</code> element.</div>
10
11 <Div>A <code>Div</code> element.</Div>
12
13 <DIV>A <code>DIV</code> element.</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 ('//div', document, function () {
21 return 'http://www.w3.org/1999/xhtml';
22 }, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
23 for (var i = 0; i < nl.snapshotLength; i++) {
24 nl.snapshotItem (i).style.color = 'blue';
25 }
26 document.getElementById ('status').firstChild.data
27 = '"//div" elements are colored blue.';
28 </script>
29 <noscript>NOSCRIPT</noscript>
30
31 </body>
32 </html>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24