js代碼收集(2)_下拉列表

下拉列表:

得到選中的菜單,以及菜單的內容

var selectIndex = document.getElementById("approveWordInfo").selectedIndex;//獲得是第幾個被選中了
	var selectText = document.getElementById("approveWordInfo").options[selectIndex].text 


當下拉列表的屬性爲disabled時,是得不到value值的

<c:if test="${accountTypeName eq '下游' }">
			  <select name="account_type_name" id="account_type_name" disabled>
		  		<option value="上游">上游</option>
				<option value="下游" selected>下游</option>
				<option value="">--請選擇---</option>
		  	</select>


 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章