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>
相关文章推荐
- select选择控制input是否可输入
- 通过INPUT输入值选择SELECT的值
- angularjs 下实现即可通过select选择 也可以通过input输入
- jquery过滤选择常用radio,select,checkbox,input 等标签
- input+select(multiple) 实现下拉框输入值
- vuejs绑定数据到select中,选择option数据后,同步改变下面一个输入框input的值
- js实现select组件的选择输入过滤代码
- 可输入的select标签(input+select)
- 可以输入值的下拉框(select和input的组合使用)
- 可以输入也可以下拉选择的select
- js:可输入可选择的select下拉框,可及时匹配包含输入的内容(兼容ie)
- js实现select组件的选择输入过滤代码
- [前端] checkbox选择统计和input输入监测
- 可以输入也可以下拉选择的select
- 基于jQuery实现select下拉选择可输入附源码下载
- sas优化技巧(4)执行必要的部分where,if、select,if else、obs firstobs、读入外部数据时选择需要的obs(if+input)、keep/drop
- jquery过滤选择常用radio,select,checkbox,input 等标签
- javascript在form提交时给input赋值,并选择select中的option中的值
- 【2009-10-12】使得select选择框也可以输入
- 修改select标签为可输入内容的input标签,同时在首次点击第一个下拉框时也会触发onchange事件