228Part IIIDocument Objects ReferenceListing 15-10(continued) document.getElementById( myList ).replaceChild(newItem, firstLI); } (Web and email hosting)
Wednesday, October 24th, 2007228Part IIIDocument Objects ReferenceListing 15-10(continued) document.getElementById( myList ).replaceChild(newItem, firstLI); } function replaceLast(form) { var newItem = makeNewLI(form.input.value); var lastLI = document.getElementById( myList ).lastChild; document.getElementById( myList ).replaceChild(newItem, lastLI); }
firstChild and lastChild Property Lab
- Initial Item 1
- Initial Item 2
- Initial Item 3
- Initial Item 4