Home > Article > Web Front-end > Radio checked problem in jquery_jquery
Today was so crazy that I searched for this difficult question all afternoon. In the end, a friend from csdn gave me the correct answer. Thank you to this friend
// $("#ISOK1").checked = "checked";
// $("#ISOK1").attr("checked", true);
//$("#Radio1").attr("checked", true);
// $("#Radio1").checked = "checked";
$("#ISOK1")[0].checked = true;
Thanks also to another netizen for telling me
If you are using jquery1.9 or later, attr should not work. You need to use $(this).prop("checked", true);$(this).removeAttr("checked"); to select and remove the selection.
Thank you also to him