用 iframe 做你的层载体, 可以参考我写的那个日历控件:
http://www.meizz.com/web/download/Web_Calendar_30.rar

解决方案 »

  1.   

    在层中加一个空的iframe就可以了
      

  2.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    <script language=javascript>
    var Obj;
    function MouseDown(obj)
    {
      Obj=obj;
      Obj.setCapture();
      Obj.l=event.x-Obj.style.pixelLeft;
      Obj.t=event.y-Obj.style.pixelTop;
    }
    function MouseMove()
    {
      if(Obj!=null)
      {
        Obj.style.left = event.x-Obj.l;
        Obj.style.top = event.y-Obj.t;
      }
    }
    function MouseUp()
    {
      if(Obj!=null)
      {
        Obj.releaseCapture();
        Obj=null;
      }
    }
    </script>
    </HEAD><BODY>
    <select>
    <option>1</option>
    </select>
    <div id=aa name=aa style="position:absolute;left:10px;top:10px;" onmousedown="MouseDown(this)" onmouseup="MouseMove()" onmouseup="MouseUp();">
    <iframe id=tt name=tt src="about:<div style='width:100px;height:50px;border:1px solid red;' onmousedown='top.document.all.aa.setCapture();'>13</div>" width=100 height=50 frameborder=0 marginwidth=0 marginheight=0 ></iframe>
    </div></BODY>
    </HTML>
      

  3.   

    为了档住下拉框,
    将层的内容移到iframe里去的做法会破坏页面的结构,互动性不好,个人认为尽可能不用。
    在层的后面加个iframe当底,也可以解决此类问题。http://jkisjk.vip.sina.com/html/MoveTableWithMouse.htm
      

  4.   

    另外,查询框做成可移动的,有点好大喜功哦 ^_^  容易让客户发挥想象力,给自己带来麻烦直接做成隐藏或不隐藏,相信一般的客户也能够接受。<html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO8859-1"><script language="JavaScript">function changeItemListNo(listNo)
    {
      document.all.itemListNo.value=listNo;
      document.frm.submit();
    }function OrderByFun(columnName)
    {
      if(columnName==document.all.orderByColumn.value)
        document.all.orderByType.value=3-document.all.orderByType.value;
      else
      {
        document.all.orderByColumn.value=columnName;
        document.all.orderByType.value=1;
      }
      document.frm.submit();
    }function ChangeFilterFun()
    {
      if(filterTbody.style.display=="none")
        filterTbody.style.display="";
      else 
        filterTbody.style.display="none"
    }function ClearFilterFun()
    {
      var theElements=document.frm.elements;
      for(var i=3;i<8;i++)
      {
        theElements[i].value="";
      }}
    </script>
    </head>
    <body leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="5">
    <form method="post" name="frm" action="SourcingRequestList.htm" >
    <table width="100%" border="0" cellspacing="1" cellpadding="0">
      <tr>
        <td colspan=4 class="pageTitle" nowrap align="left" >Sourcing Request List</td> 
      </tr>
      <tr>
        <td colspan=4 align="left" nowrap valign=bottom style="height:30">
          <input type=button class="buttonLabel" value="Change Filters" onclick="ChangeFilterFun();">
          <input type=button class="buttonLabel" value="Clear Filters" onclick="ClearFilterFun();">
          <input type=button class="buttonLabel" value="Search" onclick="this.form.submit();" >
        </td>
      </tr>
      
      <tbody id=filterTbody style="display:none">
      <tr>
        <td colspan=4 height="16"><hr></td>
      </tr>
      
      <tr>
        <td width="20%" class="attributeLabel" nowrap>Sourcing Request No.</td>
        <td colspan=3 class="attributeContent" nowrap>
          <input class="commonInputClass" name="sourcingRequestNoSearch" value="" maxlength=100 size="20" >
        </td>
      </tr>
      
      <tr>
        <td width="20%" class="attributeLabel" nowrap>Buyer</td>
        <td width="30%" class="attributeContent" nowrap>
          <input class="commonInputClass" name="buyerSearch" value="" maxlength=20 size="20" >
        </td>
        <td width="20%" class="attributeLabel" nowrap>Season</td>
        <td width="30%" class="attributeContent" nowrap>
          <input class="commonInputClass" name="seasonSearch" value="" maxlength=100 size="20" >
        </td>
      </tr>
      <tr>
        <td width="20%" class="attributeLabel" nowrap>Banner</td>
        <td width="30%" class="attributeContent" nowrap>
          <input class="commonInputClass" name="bannerSearch" value="" maxlength=20 size="20" >
        </td>
        <td width="20%" class="attributeLabel" nowrap>Commodity</td>
        <td width="30%" class="attributeContent" nowrap>
          <input class="commonInputClass" name="commoditySearch" value="" maxlength=100 size="20" >
        </td>
      </tr>
      
      </tbody>
      <tr>
        <td colspan=4 height="16"><hr></td>
      </tr>
    </table><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="dataText" align="left" nowrap width="100%">
          Page 1 of 1, Total : 3
        </td>
        <td class="dataText" nowrap align="right">Go to Page<select name=pageNo class="dropDownBoxEnable" style="width:50" onchange="changeItemListNo(this.value);">
    <option value=1 selected>1    </select></td>
        <td class="dataText" nowrap align="right">|&nbsp;</td>
        <td class="dataText" nowrap align="right">
    First
        <td class="dataText" nowrap align="middle">&nbsp;|&nbsp;</td>
        <td class="dataText" nowrap align="right">
    Previous
        <td class="dataText" nowrap align="middle">&nbsp;|&nbsp;</td>
        <td class="dataText" nowrap align="right">
    Next
        <td class="dataText" nowrap align="middle">&nbsp;|&nbsp;</td>
        <td class="dataText" nowrap align="right">
    Last 
        <td class="dataText" nowrap align="middle">&nbsp;|</td>
      </tr>
    </table><table width="100%" border="0" cellspacing="1" cellpadding="0">
      <tr class="tableHeader">
        <td nowrap style="cursor:hand" onclick="OrderByFun('orderNo')">Sourcing
          request No.<img src='../img/down.gif'></td>
        <td nowrap style="cursor:hand" onclick="OrderByFun('vendorRoleName')">Buyer</td>
        <td nowrap style="cursor:hand" onclick="OrderByFun('vendorRoleName')">Season</td>
        <td nowrap style="cursor:hand" onclick="OrderByFun('vendorRoleName')">Banner</td>
        <td nowrap style="cursor:hand" onclick="OrderByFun('buyerStyleNo')">Commodity</td>
      </tr>  <tr class="EvenOrOddRow">
        <td nowrap ><a href="SourcingRequestView.htm?3">SR0003</a></td>
        <td >B</td>
        <td >Spring</td>
        <td >B</td>
        <td nowrap >Y</td>
      </tr>  <tr class="EvenOrOddRow">
        <td nowrap ><a href="SourcingRequestView.htm?2">SR0002</a></td>
        <td >B</td>
        <td >Spring</td>
        <td >B</td>
        <td nowrap >N</td>
      </tr>  <tr class="EvenOrOddRow">
        <td nowrap ><a href="SourcingRequestView.htm?1">SR0001</a></td>
        <td >D</td>
        <td >Fall</td>
        <td >D</td>
        <td nowrap >N</td>
      </tr>  
    </table><input type=hidden name=operation value="" >
    <input type="hidden" name="itemListNo" value="1">
    <input type="hidden" name="itemListSize" value="15">
    <input type="hidden" name="orderByColumn" value="orderNo">
    <input type="hidden" name="orderByType" value="2">
    </form>
    </body>
    </html>