当前位置:编程学习 > html/css >>

通达OA 下拉列表联动文本输入框 demo

<style></style><script> function onchanged(){
        var depaterment = document.getElementById('depaterment') ;
         document.getElementById('txt').value=depaterment.options[depaterment.selectedIndex].value;
         document.getElementById('mem').value=depaterment.options[depaterment.selectedIndex].text;
    }
</script><select id="depaterment" onchange="onchanged()" name="DATA_10">
<option value="111" selected="selected">部门111</option>
<option value="222">部门222</option>
<option value="333">部门333</option>
<option value="444">部门444</option>
<option value="555">部门555</option>
</select> <br />
<input id="txt" readonly="readonly" name="DATA_11" type="text" /> <br />
<textarea id="mem" rows="5" cols="50" readonly="readonly" name="DATA_13"></textarea> <input onclick="onchanged()" type="button" name="DATA_12" value="查询" />
作者:ibmfahsion
补充:web前端 , HTML/CSS  ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,