JavaScript DHTML/Javascript Properties/offsetHeight
Get the tag offset
<source lang="html4strict">
<html> <head> <title>Overflow</title> <style type="text/css">
- div1 { width: 700px; height: 150px }
- div2 { width: 600px; height: 100px; overflow: auto }
</style> <script type="text/javascript"> function switchContent() {
document.write(document.getElementById("div2").offsetHeight);
} </script> </head> <body>
<a href="javascript:switchContent();">Switch</a>
p1
Smaller item.
</body> </html>
</source>