<input type=text name=aa onmouseover="cc(this)" onmouseout="out()">
<div id="pop" style="position:absolute;width:120; display: none; z-index:99; font-size: 13px; background: #ffff00">hello</div>
<script language="javascript">
var cen = document.all.pop;
function cc(e)
{
var ttop = e.offsetTop;
var tleft= e.offsetLeft;
var h = e.clientHeight; //在下面这个 while 循环里的e已经不是那个形参了
var w = e.clientWidth;
while (e = e.offsetParent){ttop += e.offsetTop; tleft += e.offsetLeft;}
cen.style.display = ""; //层显示
cen.style.top = ttop + h;
cen.style.left= tleft + w - cen.clientWidth;
}
function out(){cen.style.display = "none";}
</script>