This digest from: http://www.cnblogs.com/xcj1989/archive/2011/06/29/JQUERY_RADIO.html
/*---------------------------jquery Determines whether radio is selected, gets the selected value----------------------------------*/
Additional to the radio operation function, later in the Add. Directly on the code, don't forget to refer to the jquery package
<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><title>JQuery Radio</title><Scripttype= "Text/javascript"language= "JavaScript"src= "Javascript/jquery-1.6.1.min.js" ></Script><Scripttype= "Text/javascript"language= "JavaScript"> /*------Determine if Radio is selected, gets the selected value--------*/ $(function(){ $("#btnSubmit"). Click (function(){ varVal=$('input:radio[name= "Sex"]:checked'). Val (); if(Val==NULL) {alert ("There's nothing to choose from!"); return false; } Else{alert (val); } varList= $('input:radio[name= "List"]:checked'). Val (); if(List==NULL) {alert ("Please select a!"); return false; } Else{alert (list); } }); });</Script></Head><Body><formID= "Form1" ><inputtype= "Radio"name= "Sex"value= "Male" />male<inputtype= "Radio"name= "Sex"value= "female" />female<BR/><inputtype= "Radio"name= "List"value= "Very Satisfied" />Very Satisfied<inputtype= "Radio"name= "List"value= "Satisfied" />Satisfaction<inputtype= "Radio"name= "List"value= "Not Satisfied" />not satisfied<inputtype= "Radio"name= "List"value= "very poor" />very poor<BR/><inputtype= "Submit"value= "Submit"ID= "Btnsubmit" /></form></Body></HTML>
Comments: Var boolcheck=$ (' input:radio[name= ' Sex "]). Is (": checked "); Better, this method is more concise
Introduction to the jquery is () method http://www.w3school.com.cn/jquery/traversing_is.asp
Is () detects a collection of matching elements based on a selector, element, or JQuery object, and returns true if at least one of these elements matches the given parameter.
If you save after garbled, it is recommended to use notepad++ processing.
jquery Determines whether radio is selected, gets the selected value