<script type="text/javascript">
function test1(layName){
var top = document.getElementById(layName).offsetTop;
var left = document.getElementById(layName).offsetLeft;
var height = document.getElementById(layName).offsetHeight;
var width = document.getElementById(layName).offsetWidth;
alert('トップ:' + top + ' レフト:' + left + ' 高さ:' + height + ' 幅:' + width )
document.getElementById('help2').style.top = height + 100;
document.getElementById('help2').style.left = left;
}
</script>
</head>
<h1>要素の場所とサイズ</h1>
<a href="Javascript:test1('help1');">テスト</a>
<div id="help1">ヘルプ1</div>
<div id="help2">ヘルプ2</div>