js 可输入的下拉框

时间:2022-12-13 20:29:04

<div class = box id="afd">
             <select  name="yjjx" id="yjjx" class="selectTT" onChange="document.getElementById('sbtlInp222').value=this.options[this.selectedIndex].text" >
               <option value="" selected>全部</option>
               <option value="SK55-C">SK55-C</option>
               <option value="SK55SR-3">SK55SR-3</option>
               <option value="SK60-C">SK60-C</option>
               <option value="1019">SK70SR-1E</option>
               <option value="1024">SK75-8</option>
               <option value="1022">SK130-8</option>
               <option value="1009">SK140-8</option>
               <option value="1023">SK140LC-8</option>
               <option value="1003">SK200-8</option>
               <option value="1017">SK200-6E</option>
               <option value="1004">SK210-8</option>
               <option value="1001">SK210-6E</option>
               <option value="1026">SK210LC-6E</option>
               <option value="1014">SK210LC-8</option>
               <option value="1016">SK230-6E</option>
               <option value="1011">SK250-6E</option>
               <option value="1005">SK250-8</option>
               <option value="1012">SK250LC-6E</option>
               <option value="1006">SK260-8</option>
               <option value="1013">SK260LC-8</option>
               <option value="1021">SK330-8</option>
               <option value="1018">SK330-6E</option>
               <option value="1002">SK350-8</option>
               <option value="1027">SK350LC-6E</option>
               <option value="1015">SK350-6E</option>
               <option value="1025">SK350LC-8</option>
               <option value="1028">SK460-8</option>
               <option value="1010">SK480-8</option>
               <option value="1029">SK480LC-8</option>
               </select>
               <input name="mytext" type="text" class="inputTT" id="sbtlInp222" value="0" size="10">
</div>

 

 

<style type="text/css">
<!--
.box
{

 width:  100px;
 height: 21px;
 clip: rect( 0px, 181px, 20px, 0px );
 overflow: hidden;
}
.selectTT
{
 position: absolute;
 left: -1px;
 top: -1px;
 width: 100px;

 z-index: 1;
}
.inputTT {
 position: absolute;
 z-index: 5;
 height: 21px;
 width: 82px;
 left: -1px;
 top: -1px;
}
-->
</style>