开发者

ie8_getElementById()

开发者 https://www.devze.com 2023-01-08 02:29 出处:网络
What开发者_如何学Gos the difference between document.getElementById() and document.ie8_getElementById().From MSDN:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消