jquery控制radio单选框勾选和取消勾选方法

attr()方法

勾选

1

$("input[type='radio']").attr("checked",'checked');

取消勾选

1

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

prop()方法

勾选

1

$("input[type='radio']").prop("checked",true);

取消勾选

1

$("input[type='radio']").prop("checked",false);

猜你喜欢

转载自blog.csdn.net/winkexin/article/details/131017221