<div id=Layer1 
     style="border:1px solid; Z-INDEX: 1; VISIBILITY: hidden; POSITION: absolute; BACKGROUND-COLOR: #eeeeee"
 >
&nbsp;
<Select id=s1><Option value = "SubValue">aa</Option></Select> 
<INPUT type="button" value="确定"  onclick="eee();" style="border:1px solid; HEIGHT: 20px">
&nbsp;
</div>
<TABLE 
WIDTH=200 border="1" cellpadding="0" cellspacing="0"  bordercolor="#eeeeee"  onclick="aaa();"  onmouseover="bbb();" onmouseout="ccc();">
  <TR>
<TD >11</TD>
<TD >12</TD>
</TR>
<TR>
<TD >21</TD>
<TD >22</TD>
</TR>
</TABLE>
<SCRIPT >
var obj;
  function aaa()
{
obj=window.event.srcElement;
Layer1.style.visibility="visible";
Layer1.style.top=window.event.srcElement.offsetTop + 40;
Layer1.style.left=window.event.srcElement.offsetLeft+10;
}
function bbb()

window.event.srcElement.borderColor="#FF0000";
}
function ccc()
{
window.event.srcElement.borderColor="#eeeeee";

}
function eee()
{
if(obj=="[object]")
{
obj.innerText=s1.value;
Layer1.style.visibility="hidden";
}
}
</SCRIPT>

解决方案 »

  1.   

    你第二个问题是不是这个样子?
    <div id=Layer1 
         style="border:1px solid; Z-INDEX: 1; VISIBILITY: hidden; POSITION: absolute; BACKGROUND-COLOR: #eeeeee"
     >
    &nbsp;
    <Select id=s1><Option value = "SubValue">aa</Option></Select> 
    <INPUT type="button" value="确定"  onclick="eee();" style="border:1px solid; HEIGHT: 20px">
    &nbsp;
    </div>
    <TABLE 
    WIDTH=200 border="1" cellpadding="0" cellspacing="0"  bordercolor="#eeeeee"  onclick="aaa();"  onmouseover="bbb();" onmouseout="ccc();">
      <TR>
    <TD >11</TD>
    <TD >12</TD>
    </TR>
    <TR>
    <TD >21</TD>
    <TD >22</TD>
    </TR>
    </TABLE>
    <SCRIPT >
    var obj;
      function aaa()
    {
    obj=window.event.srcElement;
    Layer1.style.visibility="visible";
    Layer1.style.top=window.event.srcElement.offsetTop + 40;
    Layer1.style.left=window.event.srcElement.offsetLeft+10;
    }
    function bbb()

    window.event.srcElement.borderColor="#FF0000";
    }
    function ccc()
    {
    window.event.srcElement.borderColor="#eeeeee";

    }
    function eee()
    {
    if(obj=="[object]")
    {
    obj.innerText=s1.options[s1.selectedIndex].text;
    Layer1.style.visibility="hidden";
    }
    }
    </SCRIPT>
      

  2.   

    是地!大侠果然厉害,能帮我看看另一帖吗?谢谢
    http://expert.csdn.net/Expert/topic/3063/3063012.xml?temp=.2641413
      

  3.   

    roomid:304
    typenum:2
    发信息了,不知道在不?