/[suikacvs]/www/test/html/entref/copy-xhtml10-strict.xhtml
Suika

Diff of /www/test/html/entref/copy-xhtml10-strict.xhtml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Mon Dec 26 10:27:46 2005 UTC revision 1.2 by wakaba, Mon Dec 26 10:45:34 2005 UTC
# Line 19  with XHTML 1.0 Strict DOCTYPE Declaratio Line 19  with XHTML 1.0 Strict DOCTYPE Declaratio
19    
20  <p>The <code>innerHTML</code> of the list above is:</p>  <p>The <code>innerHTML</code> of the list above is:</p>
21  <pre id="test-source"></pre>  <pre id="test-source"></pre>
22    
23    <p>About the first <code>dd</code> element:</p>
24    <ul id="test-nodes">
25      <li>[There is no child.]</li>
26    </ul>
27    
28  <script type="text/javascript">  <script type="text/javascript">
29    var list = document.getElementById ('test-list');
30  document.getElementById ('test-source').appendChild  document.getElementById ('test-source').appendChild
31    (document.createTextNode (document.getElementById ('test-list').innerHTML));    (document.createTextNode (list.innerHTML));
32    
33    var listc = list.getElementsByTagName ('dd')[0].childNodes;
34    var ul = document.getElementById ('test-nodes');
35    if (listc.length > 0) {
36      ul.textContent = "";
37      ul.innerText = "";
38    }
39    for (var i = 0; listc.length > i; i++) {
40      var listcn = listc[i];
41      var li = document.createElementNS ("http://www.w3.org/1999/xhtml", 'li');
42      li.appendChild (document.createTextNode
43                        (i + "th child is of type |" + listcn.nodeType +
44                         "| with name |" + listcn.nodeName + "|, value |" +
45                         listcn.nodeValue + "|."));
46      ul.appendChild (li);
47    }
48  </script>  </script>
49    
50  <h2>Expected Result</h2>  <h2>Expected Result</h2>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24