Please see this:
http://jsbin.com/igeqa
here, i am simply using
alert ( tableObj.childNodes.length );
and in FF the output is 5
, while in IE it is 2
. Please tell me what is causing this behaviour?
Please see this:
http://jsbin.com/igeqa
here, i am simply using
alert ( tableObj.childNodes.length );
and in FF the output is 5
, while in IE it is 2
. Please tell me what is causing this behaviour?
Firefox counts whitespace text nodes, while IE is just counting elements. So Firefox is returning [#text, THEAD, #text, TBODY, #text], while IE is returning just [THEAD, TBODY].
IE and Moz count the childNodes in a HTML document in different ways. Moz counts every empty space (possible textNodes) as a childNode, while IE counts only some of them. There are several solutions for that.