javascript 下拉列表 自己主动取值 无需value

2023-02-12,,,,

                                    <select id="applyType" name="$!{status.expression}" class="inp" onchange="receiptAddApplyType()" style="width:150px;">
#foreach($item in ${applyTypes})
<option value="$!{item.value}" #if($!{item.value} == $!{status.value} ) selected #end >$!{item.name}</option>
#end </select>

function receiptAddApplyType(){
var s=document.getElementById('applyType');
alert(s[s.selectedIndex].text); }

不做解释,靠谱好用,自己试试

javascript 下拉列表 自己主动取值 无需value的相关教程结束。

《javascript 下拉列表 自己主动取值 无需value.doc》

下载本文的Word格式文档,以方便收藏与打印。