1. Determine the selection by obtaining the selected value Upload the code directly, don’t forget to quote the JQuery package Copy code The code is as follows: JQuery radio <br> /*------Determine whether the radio is selected and get the selected value--------*/<br> $(function(){<br> $("#btnSubmit").click(function(){<br> var val=$('input:radio[name="sex"]:checked').val();<br> if(val==null){<br> alert("Nothing selected!");<br> return false;<br> }<br> else{<br> alert(val);<br> }<br> var list= $('input:radio[name="list"]:checked').val();<br> If(list==null){<br> alert("Please select one!");<br> return false;<br> }<br> else{<br> alert(list);<br> });<br> });<br> Male Female Very satisfied Satisfied Not satisfied Very Bad Radio cannot be judged by "checked" equality, it can only be judged by true Copy code The code is as follows: <br> $(function () {<br> $("input").click(function () {<br> If ($(this).attr("checked")) {<br> alert("selected");<br> }<br> });<br> });<br>