在IE下,把一个固定高度的DIV设置自适应(auto)高度后,如何计算自适应后的高度? clientHeight、scrollHeight、offsetHeight都不对,用Jquery的height()获取,在chrome下是正确的,IE就错了。
I think clientHeight or offsetHeight should work out fine. Maybe the "height" you needed is not the generally-meant height? Or maybe you can try getBoundingClientRect.
I think
clientHeight
oroffsetHeight
should work out fine. Maybe the "height" you needed is not the generally-meant height?Or maybe you can try
getBoundingClientRect
.