<script type="text/javascript" language="javascript">    function ShowDiv() {
        //ruKuDan
        document.getElementById("ruKuDan").style.display = "block";
    }
    function ClosedDiv() {
        document.getElementById("ruKuDan").style.display = "none";
     }
</script>
<tr>
      <td>存货方式:</td>
      <td>
          <asp:DropDownList ID="add_in_stgCunHuoTypeNo" runat="server">
          </asp:DropDownList>
      </td>
      <td>入库人:</td>
      <td><input type="text" id="add_in_storageMan" runat="server" />
      </td>
      <td>ISO编号:</td>
      <td><input type="text" id="add_ISO_NO" runat="server" /></td>
      </tr>
      <tr>
      <td>仓库代号:</td>
      <td>
      <input id="add_storageNo" runat="server" />(选择好之后,这个文本框中就显示对应的仓库代号)
      <input type="button" id="btStorage" style="width:15px" onclick="ShowDiv()" />
      <div style="z-index:2px; display:none" id="ruKuDan">我想在这里读数据的仓库表,用Repeater或者GridView</div>          
      </td>
      <td>部门代号:</td>
      <td>
          <asp:DropDownList ID="add_DepartmentNo" runat="server">
          </asp:DropDownList>
      </td>
但是这个DIV还是会把页面撑大,难道在table中加个DIV没有z轴的效果吗?怎么解决呢?
我试着用过模式窗口弹出取值,但是,GridView事件没有进去,就报错了。GridView1_RowCommand事件不能实行...
其实我就想实现,这个页面取外键值时,不用下拉框,用弹出层。

解决方案 »

  1.   

    <td>
      <input id="add_storageNo" runat="server" />(选择好之后,这个文本框中就显示对应的仓库代号)
      <input type="button" id="btStorage" style="width:15px" onclick="ShowDiv()" />
      <div style="z-index:2px; display:none;position:absolute;top:80px;left:80px" id="ruKuDan">我想在这里读数据的仓库表,用Repeater或者GridView</div>   
      </td>
      

  2.   

    是不是div没有设定固定的呢,也就是我们看到的漂浮。
      

  3.   

    在IE6中div显示时覆盖不了它后面的下拉框。
    但是在火狐中正常显示。
      

  4.   

    这是通病 DIV 覆盖不了select 等下拉控件  你可以尝试 显示div的时候隐藏下拉控件或者 用iframe 来解决  
      

  5.   

    <iframe id="aaaa" style="position: absolute; z-index: 9; width: expression(this.nextSibling.offsetWidth); height: expression(this.nextSibling.offsetHeight); top: expression(this.nextSibling.offsetTop); left: expression(this.nextSibling.offsetLeft);" frameborder="0">
    </iframe>
    <div id="div" runat="server" style="position: absolute;display:none; z-index: 9999; overflow: auto;">
    </div>-------
    div里面要写什么随你,上面的iframe照抄不要动,就能放置dropdownlist一类阻挡问题了。