The item MethodThe item method gives you another way to access objects in a collectionyou can use this method rather than an array index. You can see the support for this method in Table 6.32. Table 6.32. The item Method
Here are two ways to access the same node: document.getElementById("span1").childNodes.item(5) document.getElementById("span1").childNodes[5] Tip In the Internet Explorer, you also can use an item's ID value as the array index, or to access the item with the item method. |