好象下拉框做不到,用DIV模拟一个吧
<div style="overflow:auto">

解决方案 »

  1.   

    我的设想:
    在下拉框上面放一个TEXTAREA ,把它设为只读,让后选择下拉框的内容,把它赋到TEXTAREA 里
      

  2.   

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <link href="style.css" rel="stylesheet" type="text/css">
    <script src="getdate.js"></script>
    <title>添加新用户</title><style type="text/css">
    <!--
    body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    }
    .textbox {font-size: 14px; color: #000033; background-color: #FFFFFF; border: 1px #000066 double}
    .style2 {color: #990033}
    -->
    </style>
    </head><script langauge="javascript">
    var showed=0;
    var clickfrom =0;// 0- document 1- otherfunction CheckDep(  DepName )
    {
    theform.textfield.value = DepName;
    //pDepName.rows[0].cells[0].innerText ="  "+ DepName;
    eval(DepLayer).style.display ="none";
    }function ShowDep()
    {
    if (showed==0)
    {
    clickfrom=1;
    eval(DepLayer).style.display='';
    showed=1;
    }
    else if ( showed==1 )
    {
    eval(DepLayer).style.display ="none";
    showed=0;
    }
    }
    document.onclick = OnClick;
    function OnClick()
    {
    //
    if ( showed == 1 )
    {
    if ( clickfrom ==1 )
    {
    clickfrom =0;
    return;
    }
    eval(DepLayer).style.display ="none";
    showed=0;
    }
    }
    </script><body width="600" border="0" oncontextmenu="return false" scroll=no><form action="useradd.asp" method="post" name="theform" enctype="multipart/form-data">
    <table width="100%" height=""  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td >部&nbsp;&nbsp;&nbsp;&nbsp;门:
          <input name="textfield" type="text" onClick="ShowDep()" value="-" size="30" readonly="true" >
          <div id="Layer1" style="position:absolute; left:270px; top:3px; width:16px; height:13px; z-index:2;"><a href="#" onClick="ShowDep()"><img src="combo.gif" width="16" height="16" border="0"></a></div>
          <div id="DepLayer" name="DepLayer" style="position:absolute; left:65px; top:20px; width:221px; height:163px; z-index:1; overflow: scroll; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000;display:none" >
            <table  border="1" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
              <tr>
                <td>
                  <table   border="0">
                    <tr >
                      <td ><a href="#" onClick="CheckDep('-')">-</a></td>
                    </tr>
                    <tr >
                      <td><a href="#" onClick="CheckDep('一薰一莸')">一薰一莸</a></td>
                    </tr>
                    <tr >
                      <td><a href="#" onClick="CheckDep('二百五')">二百五</a></td>
                    </tr>
                    <tr>
                      <td><a href="#" onClick="CheckDep('三七二十一')">三七二十一</a></td>
                    </tr>
                    <tr>
                      <td><a href="#" onClick="CheckDep('四通')">四通</a></td>
                    </tr>
                    <tr>
                      <td><a href="#" onClick="CheckDep('五劳七伤')">五劳七伤</a></td>
                    </tr>
                    <tr>
                      <td><a href="#" onClick="CheckDep('六尺之孤')">六尺之孤</a></td>
                    </tr>
     <tr>
                      <td><a href="#" onClick="CheckDep('fffffffffffffffffffffffffffffffffffffffffffffffffffff')">fffffffffffffffffffffffffffffffffffffffffffffffffffff</a></td>
                    </tr>
                    <%=OptionList(0, "") %>
                </table></td>
              </tr>
            </table>
          </div></td>
      </tr>
    </table></form></body>
    </html>