If the attribute height is not written in all lowercase, such as window.screen.Height or window.screen.heighT, the value can be obtained under IE6 and IE7 (IE6 and IE7 are not case-sensitive), and the value under IE8 is undefined (IE8 is case sensitive), so the problem occurs.
Example: