原文:js如何獲取到select的option值???

獲得選項option的值 var obj document.getElementByIdx x testSelect 定位idvar index obj.selectedIndex 選中索引var text obj.options index .text 選中文本var value obj.options index .value 選中值jQuery中獲得選中select值第一種方式 testS ...

2018-09-18 15:11 0 9437 推薦指數:

查看詳情

JS獲取select選中的,所有option

<select name="myselect" id="myselect">    <option value="2042">1--測試二級頁面專題</option>    <option value="2031">2--2016年浙江省 ...

Fri Nov 04 01:30:00 CST 2016 0 8431
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM