动态创建的div的高度

动态创建的div的高度

本文介绍了找到动态创建的div的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试确定动态创建的div的高度时,clientHeight和offsetHeight属性都没有为我设计。有人可以建议替代吗?非常感谢。

Neither of the properties clientHeight and offsetHeight has worked out for me while I try to determine the height of the div created dynamically. Could someone suggest alternative please? Thanks a ton in advance.

推荐答案

我不是JQuery的粉丝。我使用nativemydiv.offsetHeight - 适用于IE和FF。

I'm not a fan of JQuery. I use the "native" mydiv.offsetHeight - works with IE and FF.

这篇关于找到动态创建的div的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 19:07