Radio Group Radio: $ ("input[@type =radio][@checked]"). Val ();
Radio Group Radio: $ ("input[@type =radio]"). attr ("Checked", ' 2 ');//Set value=2 for the currently selected item
Gets the value of a set of radio selected items
var item = $ (' input[@name =items][@checked] '). Val ();
Radio the second element of a radio group is the currently selected value
$ (' input[@name =items] '). Get (1). Checked = True
Radio Group Radio: $ ("input[@type =radio]"). attr ("Checked", ' 2 ');//Set value=2 for the currently selected item
The old version of jquery
Var_name = $ ("input[@name = ' radio_name ']:checked"). Val ();
jquery 1.3 later versions
Var_name = $ ("input[name= ' Radio_name ']:checked"). Val ();
See a jquery instance that gets the radio value
Function Getra () {
Var_name = $ ("input[name= ' isspecialcnt ']:checked"). Val ();
//alert (var_name);
If (var_name== ' 1 ') {
$ ("#isspecialcntyes"). Show ();
$ ("#isspecialcntno"). Hide ();
}
if (var_name== ' 0 ') {
$ ("#isspecialcntyes"). Hide ();
(www.111cn.net) $ ("#isspecialcntno"). Show ();
}
}
<form name= "Form1" method= "Post" action= "" >
<p>
<label>
<input type= "Radio" name= "Radiogroup1" value= "Single Selection" id= "Radiogroup1_0" >
Radio </label>
<br>
<label>
<input type= "Radio" name= "Radiogroup1" value= "Single Selection" id= "Radiogroup1_1" >
Radio </label>
<br>
<label>
<input type= "Radio" name= "Radiogroup1" value= "Single Selection" id= "Radiogroup1_2" >
Radio </label>
<br>
<label>
<input type= "Radio" name= "Radiogroup1" value= "Single Selection" id= "Radiogroup1_3" >
Radio </label>
<br>
<label>
<input type= "Radio" name= "Radiogroup1" value= "Single Selection" id= "Radiogroup1_4" >
Radio </label>
<br>
<label>
<input type= "Radio" name= "Radiogroup1" value= "Single Selection" id= "Radiogroup1_5" >
Radio </label>
<br>
</p>
</form>
From:http://www.111cn.net/wy/jquery/jquery-radio.htm
jquery Gets the radio value