忘了加一点说明,不要用div和span!

解决方案 »

  1.   

    这是因为select  的z-index值比较高的缘故,一般 的控件都挡不住select
      

  2.   

    这个不知道如何用我用了
    <select name="myselect" style="left:450px; top:89px; width:115px; height:18px; z-index:2;">
    </select>
    <input type="text" name="test" style="position:absolute; left:50px; top:20px; width:95px; height:18px; z-index:1;">
    但无效
      

  3.   

    同意richardluopeng(罗罗),select控件的z-index值是最高的,只能用层来模拟select了
      

  4.   

    看来只能用这种东西啦?
    <head>
    <style>
    .cls1 { position:absolute; left:250px; top:89px; width:216px; height:72px; z-index:1; }
    .cls2 { position:absolute; left:250px; top:89px; width:95px; height:18px; z-index:2 }
    input { font-size: 12px; padding-top: 2px; padding-left: 2px;width:127;}
    </style>
    </head>
    <script language=javascript>
    //******************************************************************************************************************************
      function addOption(pos){
    if (event.keyCode==13&&event.ctrlKey){
      var select_obj = document.getElementById("myselect");
      var text_value   = document.getElementById("test").value;
      var the_option= new Option(text_value,text_value);
      select_obj.add(the_option);
      select_obj.selectedIndex = select_obj.options.length-1
    }
      }
    //******************************************************************************************************************************
    </script>
    <div class="cls1" style="clip: rect(3 280 21 110)"> 
      <select name="myselect" style="width:127" onchange="document.getElementById('test').value=this.value">
      </select>
    </div>
    <div class="cls2">
    <input type="text" name="test" onkeydown="addOption()" size="20" style="width: 127; height: 23">
    </div>