
I have to use a picture, Stackoverflow says:
Oops! Your question couldn’t be submitted because:
Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.
The screenshot was taken from Stackoverflow’s form.
Internet Explorer has no problems with the length property. If it didn’t support it, then it would report
undefinednot0.The HTML is invalid, there is no
nameattribute for thedivelement. Internet Explorer is just error recovering in a different way to Firefox and not matching the div elements withgetElementsByName— MSDN getElementsByNameMethod
Use a class instead. Internet Explorer 8 doesn’t have a native
getElementsByClassName, but there are no shortage of cross-browser implementations or you could use a selector engine or a big library that includes one such as YUI or jQuery.