DOM Assignment

These can be in one or more scripts. Use an external JavaScript page at least once.

Problem #1: Show a area set up to receive information and the use of DOM to place information in the area.

Problem #2: Make an example of getElementByID, getElementsByName, getElementsbyTagName, getElementsByClassName.

Problem #3: Make examples to illustrate changing the inner HTML of an element, changing the attribute value of an HTML element, changing the style of an HTML element.

Problem #4: Write the code to remove an HTML element, add an HTML element and replace an HTML element.

Problem #5: Look at the Finding HTML objects at W3schools ( and implement 5 of them.

Problem #6: Using this as a model please write a program that generates a list of lines for a msg within a loop and then writes the msg at the end of the loop. Nesting with DOM

Problem #7: Using an associative array do something like I illustrated in this example. Associative array with DOM

Problem #8: Look at these addrow examples and do something similar