ie8_getElementById()
What开发者_如何学Gos the difference between document.getElementById() and document.ie8_getElementById().
From MSDN: In IE8 mode, getElementById performs a case-sensitive match on the ID attribute only. In IE7 mode and previous modes, this method performs a case-insensitive match on both the ID and NAME attributes.
In other words, it works like the rest of the world in ie8 mode. You should always call getElementById, it just works differently in different versions of ie.
IE8 mode, getElementById performs a case-sensitive match on the ID attribute only. In IE7 mode and previous modes, this method performs a case-insensitive match on both the ID and NAME attributes, which might produce unexpected results.
http://msdn.microsoft.com/en-us/library/ms536437%28VS.85%29.aspx
精彩评论