[转]jQuery操作<input type="radio">
2013-05-24 17:24
603 查看
本文转自:/article/4898438.html
<input type="radio">如下:
?
1、获取选中的radio的值:
?
使用元素选择器,再使用属性过滤器name='city',最后使用:checked选取被选中的元素。
2、给指定值的radio设置选中状态:
?
给name="city"而且value="YangZhou"的radio设置选中状态。
3、取消name="city"的radio的选中状态:
?
4、获取name="city"的radio的个数:
?
5、获取name="city"而且索引是偶数的radio:
?
索引是从0开始的。
6、获取name="city"而且索引是奇数的radio:
?
索引是从0开始的。
7、迭代radio:
?
迭代name="city"的radio。
8、禁用radio:
?
禁用name="city"的radio。
9、启用radio:
?
启用name="city"的radio。
<input type="radio">如下:
?
?
2、给指定值的radio设置选中状态:
?
3、取消name="city"的radio的选中状态:
?
?
?
6、获取name="city"而且索引是奇数的radio:
?
7、迭代radio:
?
8、禁用radio:
?
9、启用radio:
?
相关文章推荐
- jQuery操作<input type="radio">
- jQuery操作<input type="radio">
- jQuery操作<input type="radio">
- jQuery操作<input type="radio">
- jQuery操作<input type="checkbox">
- jQuery操作radiojQuery操作<input type="radio">
- jQuery操作<input type="radio">
- JS获取jQuery获取当前<input type="text" />的value--通过测试了
- jQuery动态添加<input type="file">
- JQuery------获取<input type="file">中的文件内容
- <input type="radio" />的选中和禁用
- Jquery 获得<input type="text" id="test">中的value
- JQuery------获取<input type="file">中的文件内容
- 页面<input type="radio"...>取值
- <input type="radio" >与<input type="checkbox">值得获取
- 解析<button>和<input type="button"> 的区别
- [Cordova] 改进InAppBrowser插件(WebView),让其<input type="file">支持选择文件
- <input type="file" />浏览时只显示指定文件类型
- Jquery对<s:radio list="#{1:'是',0:'否'}" name=""></s:radio>清空设置
- <input type="email">控件的验证