Why is that, when I navigate a UL's childNodes using javascript, every other childNode is of type "text?"
So, when I do something like this "myUL.childNodes[0].nodeName" (that is "nodeName" -- Y! answers truncates it) , I get "text" -- as I do with every odd numbered childNode and the last childNode. Yet, when I build up an unordered list via Javascript and the DOM, there are NO text nodes. Any clues as to why?
Public Comments
- In FireFox, any white space is considered a text node so: <root> <node> Has a white space between root and node but: <root><node> does not. This is necessary for correct CSS formatting of PRE tags. IE does not consider the white space as a text node which is the source of a lot of frustration. There are several ways of dealing with this, but none are elegant.
Powered by Yahoo! Answers