radio checked problem in jquery
- 2020-05-16 06:19:03
- OfStack
I have been searching for this difficult question for 1 afternoon. In the end, my friend of csdn gave me the correct answer. Thank you, my friend
// $("#ISOK1").checked = "checked";
// $("#ISOK1").attr("checked", true);
//$("#Radio1").attr("checked", true);
// $("#Radio1").checked = "checked";
$("#ISOK1")[0].checked = true;
And thanks to another netizen for telling me
If you are using jquery 1.9 or later, attr should not work, but $(this).prop("checked", true); $(this). removeAttr (" checked "); Select and deselect
Thank him in the same way