I am a beginner in JavaScript/HTML.
I'm learning my way around the DOM and JavaScript and am using the following page to explore accessing nodes via JavaScript:
http://franklyanything.com/test2.html
As you can see in the snippet of JavaScript I put in the Head, I'm trying to access the 2nd child of the <html> element, which should be the Body element.
However each time I run the page nothing happens and Firebug reports the variable as undefined. I have no problems if I change the index from [1] to [0]. This correctly identifies the <html> tag.
I'm stumped. What can I try next?