.n.a.v.i.g.a.t.i.n.g. the DOM

example 1

a couple built in functions:




the alert function
see more about alerts here
window.open
example 2:

a funtion called example2 goes to div with 'id-1' changes the node value to the value passed to it

click me and click to get back
example 3:

a function called example3 locates the div with the id 'id-2' and changes the value of the font color

change it #1338A6 and change it white. change it back to black.
example 4:

a function called example4 changes the innerHtml of the div with id of id-3


this link changes the innerhtml below.
example 5:

a function called example5 accesses the body tag and changes the value of the background color (bgColor in js) change the background color, and
change it back.
this is a div with the id of id-1
this is a div with the id of id-2
this is a div with id id-3