jquery controls the method of checking and unchecking the radio radio button

attr() method

tick

1

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

Uncheck

1

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

prop() method

tick

1

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

Uncheck

1

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

Guess you like

Origin blog.csdn.net/winkexin/article/details/131017221