jquery Gets the value of the radio selection
Code$ ("Input[name= ' Radio_name '][checked]"). Val ();//Select the value of the selected radio
$ ("#text_id"). focus (function () {//code ...})//event triggered when object text_id gets focus
$ ("#text_id"). blur (function () {//code ...})//event triggered when object text_id loses focus
$ ("#text_id"). Select ();//Make the Vlaue value of the text box selected
$ ("Input[name= ' radio_name '][value= ' to select Radio Value '").
attr ("checked", true);//Set radio as selected based on value values
jquery Gets the value of the checkbox selection
$ ("Input[name= ' Checkbox_name '][checked]");//Select a collection of selected checkbox elements if you want to
value you need to traverse this collection
$ ($ ("Input[name= ' Checkbox_name '][checked]")).
Each (function () {arrchk+=this.value + ', ';}); /Traverse the collection of selected checkbox elements to get value values
$ ("#checkbox_id"). attr ("checked");//Get the status of a checkbox (there is no selection, return True/false)
$ ("#checkbox_id"). attr ("Checked", true);//Set the status of a checkbox to checked (checked=true)
$ ("#checkbox_id"). attr ("checked", false);//Set a checkbox with a status of unchecked (Checked=false)
$ ("Input[name= ' Checkbox_name ']"). attr
("Checked", $ ("#checkbox_id"). attr ("checked"));//According to the 3,4,5 bar, you can analyze the meaning of this code
$ ("#text_id"). Val (). Split (",");//Returns an array of value values of text as ', ' delimited
The above operation, in fact, is the use of jquery selector, I hope you have a solid grasp of the jquery selector knowledge.
jquery-set of operations on Radio/checkbox