原来梅花雨大哥的相对定位方法<input type="text" name="aa" ><input type="button" name=bba onClick="set1();">
<input type="text" name="bb" ><input type="button" name=bbb onClick="set2();">
<iframe id="Layer1" frameborder="0" style="position:absolute; width:50px; height:50px; z-index:1; left: 20px; top: 319px; overflow: hidden; display:none; border: 1px" src="\">
</iframe><script>
function gettop(tt)
{
  var ttop  = tt.offsetTop;     //TT控件的定位点高
  var thei  = tt.clientHeight;  //TT控件本身的高
  while (tt = tt.offsetParent){ttop+=tt.offsetTop}
  return ttop+thei
}
function getleft(tt)
{
  var tleft = tt.offsetLeft;    //TT控件的定位点宽
  while (tt = tt.offsetParent){tleft+=tt.offsetLeft}
  return tleft
}function set1()
{
  var daps  = document.all.Layer1.style;  daps.top  = gettop(document.all["aa"]) //层的 Y 坐标
  daps.left = getleft(document.all["aa"])  //层的 X 坐标
  daps.display = "";  //层显示}function set2()
{
  var daps  = document.all.Layer1.style;  daps.top  = gettop(document.all["bb"]) //层的 Y 坐标
  daps.left = getleft(document.all["bb"])  //层的 X 坐标
  daps.display = "";  //层显示}
</script>你想做一个增强型的下拉列表框,是吧,呵呵