原文:JS 获取select当前选中值和文本

var sel document.getElementsByName paydate var selvalue sel.options sel.options.selectedIndex .value 你要的值 var seltext sel.options sel.options.selectedIndex .innerHTML 你要的文本 ...

2013-01-08 17:35 0 4735 推荐指数:

查看详情

js获取select默认选中的Option (非当前选中值

js函数方法: Demo: 不知道还有没有更方便快捷的方法,曾尝试通过jQuery获取$('#sel option[defaultSelected]'),可一直返回空。 各位园友,我要的是select控件初始化的值,非select当前选中的值,初始化的值不随 ...

Wed May 07 01:07:00 CST 2014 10 6378
jQuery获取select选中值文本

实际代码:var checkUserSelect=$("#checkUserSelect option:selected").text();//执法人员姓名 jQuery中获得选中select值第一种方式$('#testSelect option:selected').text ...

Fri Oct 18 00:23:00 CST 2019 0 2239
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM