<html>
<head>
<script>
function test()
{
document.getElementById("target").style.height = "100px";
}
</script>
</head>
<body>
<div style="height: 50px; background: red; width: 100px;" id="target">
<div>
<div style="height:100%; background: green;"></div>
</div>
</div>
</body>
<script>
document.body.offsetTop;
test();
</script>
</html>