To add, that's not the only funny thing that happens in IE. IE does not follow the strict or transitional parsing of HTML. id can be replaced by name for IE. I am not sure if this is true for IE8 but till 7.x that's the case.
For testing the UI, safari or opera or firefox are good options, also now we have chrome.
Himanshu, thats true, which is why I'd wanna repeat what Bear always pushes ... use external libs for some of the DOM and Event stuff, for example Dojo and other frameworks would always work in cross browser way, so you don't have to worry about it yourself and you can focus on the "job" at hand so as to speak.
BTW, on IE, I doubt if there is any organization that has completely abandoned IE testing, most of teams I have worked with test predominantly on IE, and all bugs related to js on Firefox et. al are marked minor (usually the case), but I am pretty sure it varies with organization, but generally one <b>should</b> test on IE. IE8 looks better than 7, but I haven't played with it completely, but there are differences on being non-standard(still ... things like Event bubbling), which stinks, I don't understand why Msft is so hell bent on being non-con formant.
I personally was in love with firebug and Firefox, but then i found Chrome ... it is just so fast (I don't have any benchmarks to back that up I am afraid, just personal experience with it), plus it has firebug kinda thing built into it, much better.