Jquery 操作RadioButtonList,DropDownList
Posted rovedog
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jquery 操作RadioButtonList,DropDownList相关的知识,希望对你有一定的参考价值。
Jquery版本2.1.4
RadioButtonList
1.获取值:
$("input[name=‘rbtn‘]:checked").val();
2.设置值
$("input[name=‘rbtn‘]:checked").val(val);
其中val为值
DropDownList
1.获取值:
$("#ddl").val();
2.设置值:
$("#ddl").find("option[value=‘val‘]").attr("selected", true);
以上是关于Jquery 操作RadioButtonList,DropDownList的主要内容,如果未能解决你的问题,请参考以下文章