<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script>
function vis(obj){
var od = document.getElementById('od'), o = obj, x = 0, y = 0, h = obj.offsetHeight;
while(o != null){
x += o.offsetLeft;
y += o.offsetTop;
o = o.offsetParent;
}
od.style.left = x+'px';
od.style.top = y+ h +'px';
od.style.visibility = 'visible';
}
function hid(){
document.getElementById('od').style.visibility = 'hidden';
}
</script>
</head>
<body>
<div id="od" style="visibility:hidden; position:absolute; width:50px; height:100px; border:1px solid #00f">一个DIV</div>
<a href="#" onclick="vis(this)" onmouseout="hid()">第一个文本框</a> <a href="#" onclick="vis(this)" onmouseout="hid()">第二个广本框</a>
</body>
</html>