Web hosting companies - 314Part IIIDocument Objects ReferenceListing 15-31(continued) if (document.getElementById( myOL ) &&
314Part IIIDocument Objects ReferenceListing 15-31(continued) if (document.getElementById( myOL ) && oldNode) { var innards = document.getElementById( myOL ).children; while (innards.length > 0) { oldNode.insertBefore(innards[0]); } document.getElementById( myOL ).replaceNode(oldNode); } } // swap first and last nodesfunction swap() { if (document.getElementById( myUL )) { document.getElementById( myUL ).firstChild.swapNode( document.getElementById( myUL ).lastChild); } if (document.getElementById( myOL )) { document.getElementById( myOL ).firstChild.swapNode( document.getElementById( myOL ).lastChild); } } // remove last nodefunction remove() { if (document.getElementById( myUL )) { document.getElementById( myUL ).lastChild.removeNode(true); } if (document.getElementById( myOL )) { document.getElementById( myOL ).lastChild.removeNode(true); } }
Node Methods
Here is a list of items:
- First Item
- Second Item
- Third Item
- Fourth Item