HomeLandon Woolley

DOM Manipulation Using createElement, appendChild, insertBefore, removeChild Exmaple

New Element with appendChild()

appendChild() adds the new element to the existing list.
Locations:
California
Utah
Idaho
Arizona
Washington
New York

New Element with insertBefore()

insertBefore() adds the new element on the top.
Locations:
California
Utah
Idaho
Arizona
Washington
New York

Remove element with removeChild()

In this example I removed California, Arizona, New York and Washington.
Locations:
California
Utah
Idaho
Arizona
Washington
New York
CIT 261 Mobile Application - Landon Woolley - [email protected]