jquery获取选中的文本和值的方法_jquery
来源:懂视网
责编:小采
时间:2020-11-27 21:25:16
jquery获取选中的文本和值的方法_jquery
jquery获取选中的文本和值的方法_jquery:1、说明 (1)获取select下拉框选中的索引 $(#selection).get(0).selectedIndex; (2)获取select下拉框选中的值 $(#selection option:selected).val(); (3)获取select下拉框选中的文本 $(#selection opti
导读jquery获取选中的文本和值的方法_jquery:1、说明 (1)获取select下拉框选中的索引 $(#selection).get(0).selectedIndex; (2)获取select下拉框选中的值 $(#selection option:selected).val(); (3)获取select下拉框选中的文本 $(#selection opti
1、说明
(1)获取select下拉框选中的索引
(2)获取select下拉框选中的值
(3)获取select下拉框选中的文本
2、实现源码
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
jquery获取选中的文本和值的方法_jquery
jquery获取选中的文本和值的方法_jquery:1、说明 (1)获取select下拉框选中的索引 $(#selection).get(0).selectedIndex; (2)获取select下拉框选中的值 $(#selection option:selected).val(); (3)获取select下拉框选中的文本 $(#selection opti