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

                                    <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);

	}

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

posted on 2014-07-25 14:38  王大王  阅读(269)  评论(0编辑  收藏  举报

导航