开发者

ie7 clientWidth and clientHeight problems

I've tried to get the offsetWidth and offsetHeight properties like so:

<div id="somediv" class="some_class_with_dimensions"></div><script...>alert(document.getElementById('somediv').offsetWidth);</script>

Unfortunately, on IE7 offsetWidth only works if i call in on window.onload, otherwise it just returns 0. Does anyone know any other way around this problem, because i need to immediately work with "somediv" just like in开发者_StackOverflow社区 real browsers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜