<div style="height: 200px; width: 100%; overflow: auto; position: relative;" id="div1"> <div style="height: 2000000px; width: 1000px;" id="hugeDiv"> </div> XXXXXXXXXX</div>
<!DOCTYPE HTML><html lang=""><head> <meta charset="gbk"> <title></title></head><body> <div style="height: 200px; width: 100%; overflow: auto; position: relative;" id="div1"> <div style="height: 2000000px; width: 1000px;" id="hugeDiv"></div> XXXXXXXXXX </div> <script type="text/javascript"> alert( document.getElementById('hugeDiv').offsetHeight ) </script></body></html>
HTML code
<!DOCTYPE HTML><html lang=""><head> <meta charset="gbk"> <title></title></head><body> <div style="height: 200px; width: 100%; overflow: auto; position: relative;" id="div1"> <div style="height: 123456789px; width: 1000px;" id="hugeDiv"></div> XXXXXXXXXX </div> <div id="test"></div> <script type="text/javascript"> document.getElementById('test').innerHTML = document.getElementById('hugeDiv').offsetHeight; </script></body></html>
正需要
应该就是个显示上限的问题吧
比如
HTML code
nbsp;HTML>