可输入下拉框

HTML部分

<div style="position:relative;text-align: center;min-height: 150px;">
<select id="sel_Diagnosis"style=" 360px;height: 40px;" onchange="document.getElementById('txt_Diagnosis').value=this.value"><!--将选中option传到input中(写到select内不要写到option中)-->

<!--onchange="document.getElementById('txt_Diagnosis').value=this.value"-->
<option value="足月产后">足月产后</option>
<option value="早产产后">早产产后</option>
<option value="剖宫产产后">剖宫产产后</option>
</select>
<input name="text" id="txt_Diagnosis" class="iInput ">
<button class='btn btn-info btn-sm' data-bind="click: $root.SaveDiagnosis" >保存</button>
</div>

css部分

<style>
.iInput{
margin-left: -62%;
326px;
height: 37px;
top: 2px;
border-bottom: 0px;
border-right: 0px;
border-left: 0px;
border-top: 0px;
position: absolute;
}
</style>

原文地址:https://www.cnblogs.com/benbenjia/p/9558369.html