This article is mainly on the jquery to obtain the value of Radio,checkbox selection of a detailed introduction, the need for friends can come to the reference, I hope to help you.
$ ("Input[name= ' Radio_name '][checked]"). Val (); Select the value $ ("#text_id") of the selected radio. focus (function () {//code ...}); Event triggers $ ("#text_id") when object text_id gets the focus. blur (function () {//code ...}); Event triggers $ ("#text_id") when object text_id loses focus. Select (); Makes the Vlaue value of the text box selected $ ("Input[name= ' radio_name '][value= ' to select Radio Value '"). attr ("Checked", true); Set Radio to selected state jquery based on value value $ ("Input[name= ' Checkbox_name '][checked]"); Select a collection of selected checkbox elements if you want the value you want to traverse this set $ ($ ("Input[name= ' Checkbox_name '][checked]")). each (function () {arrchk+=this.value + ', ';}); /Traverse the collection of selected checkbox elements to get value $ ("#checkbox_id"). attr ("checked"); Gets the state of a checkbox (has not been checked, returns True/false) $ ("#checkbox_id"). attr ("Checked", true); Sets the status of a checkbox to be checked (checked=true) $ ("#checkbox_id"). attr ("checked", false); Sets the state of a checkbox to be unchecked (Checked=false) $ ("Input[name= ' Checkbox_name ')"). attr ("Checked", $ ("#checkbox_id"). attr (" Checked "))//According to 3,4,5, you can analyze the meaning of this Code $ (" #text_id "). Val (). Split (", "); The value of text is separated by ', ' to return an array