Data source:
- Script Home
- www.jb51.net
- www.kanshule. com
<script> <br>document.write("<strong>Get the li information of the outer ul:</strong>< br>"); <br>var tree1 = document.getElementsByTagName("ul")[0].childNodes; <br>for (var i = 0;i < tree1.length;i ){ <BR>document. write(tree1[i].innerHTML); <BR>} <br><br>document.write("<br><br><strong>Get the li information of the inner layer ul:</strong> <br>"); <br><br>var tree2 = document.getElementsByTagName("ul")[1].childNodes; <br>for (var i = 0;i < tree2.length;i ){ <BR>document.write(tree2[i].innerHTML); <BR>} <br><br></script>