html:主要是要style要设置好,两者看起来吻合
<td>
<select align="left" id="type" style="width:300px;height:30px;" onchange="voluation()" >
<%--<option value=""></option>--%>
<c:forEach items="${requestScope.selectsqlabout}" var="themtype">
<c:if test="${themtype.sqltype!=null}">
<option selected="selected" value="${themtype.sqltype}">${themtype.sqltype}</option>
</c:if>
</c:forEach>
<input type="text" id="sqltype" name="sqltype" value="${Sqltypess}" style="width: 282px;height: 29px;margin-left: -303px;">
</select>
</td>
js:把选择的值赋给input
function voluation(){
var selectValue = $(’#type’).val();
console.log(selectValue);
$("#sqltype").val(selectValue);
}