日期:2014-05-20 浏览次数:20813 次
JComboBox combo = new JComboBox();
combo.setEditable(true);
------解决方案--------------------
<html>
<head>
<title>Simple</title>
<script type="text/javascript">
function change(){
var sel=document.getElementById("sel");
document.getElementById("tex").value=sel.options[sel.selectedIndex].value;
}
</script>
</head>
<body>
<select id="sel" onchange ="change();">
<option selected value="First">First</option>
<option value="Second">Second</option>
<option value="Third">Third</option>
</select>
<br/>
<br/>
<input type="text" id="tex" value="First" disabled="false" />
</body>
</html>
------解决方案--------------------
好吧……我错了---