您的位置:首页 > 其它

input+select,输入+选择

2017-01-18 17:00 295 查看
<body>
<table>
<tr>
<td >
<div id="cdiv" style="position:relative;width: 65;height: 24" class="">
<span style="margin-left:65px;width:18px;overflow:hidden">
<select style="width:83px;margin-left:-65px"   id="selecttype">
<option value="国  有">国  有</option>
<option value="独  资">独  资</option>
<option value="中外合资">中外合资</option>
<option value="国内合资">国内合资    </option>
<option value="个体户">个体户</option>
<option value="其  他">其  他</option>
</select>
</span>
<input id="vccorptype" name="tbp.vccorptype" style="width:65px;position:absolute;left:0px">
</div>
</td>

</tr>
<script src="jQuery v1.11.3.min.js"></script>
<script>
$("#selecttype").on("change",function(){
var text = $(this).find("option:selected").text();
$("#vccorptype").val(text)
})
$("#vccorptype").on("change",function(){
console.log(2)
})
</script>
</table>
</body>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: