***jQuery使用总结(原创)

时间:2015-12-08 00:26:38   收藏:0   阅读:150

Q:

jquery选择器为变量时是怎么办

A:

一个变量我知道可以这样写:$("#"+id)


 

Q:

如何清除单选框的checked属性

A:

$("input[type=‘radio‘]").removeAttr(‘checked‘);


 

jquery 如何获取单选框的值

获取单选框的值有三种方式:

1、$(‘input:radio:checked‘).val();
2、$("input[type=‘radio‘]:checked").val();
3、$("input[name=‘rd‘]:checked").val();

原文:http://www.cnblogs.com/kenshinobiy/p/5027796.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!