原文: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