First, the problem
$ ( "# swIdInForm") removeAttr ( "the checked." );
$ ( . "#swIdInForm") attr ( "the checked", "to true"); // increase again does not work
RemoveAttr after use () to remove the radio checked property, use attr () again to increase ineffective;
Second, the solution
$("#swIdInForm").removeAttr("checked"); $("#swIdInForm").prop('checked',true);
Use prop () to reconfigure the property
Note: true and false have two properties, such as checked, selected or disabled using prop (), others use attr ().
Unfinished. . .