PHP code: [php] <li> <span class = "l2"> city </span> <select class = "city"> <option value = ""> select city </ option> <% foreach from = $ supportcity item = city key = k %> <option value = "<% $ k %>" <% if $ nowcity = $ city. city_name %> selected <%/if %> <% $ city. city_name %> </option> <%/foreach %> </select> </li> <span class = "l2" id = "area"> region </span> <% foreach from = $ supportcity item = city key = k %> <select class = "area" citycode = "<% $ k %>"> <option value = ""> select the region </option> <% foreach from = $ city. areas item = area %> <option value = "<% $ area. area %> "> <% $ area. area %> </option> <%/foreach %> </select> <%/foreach %> </li> Jquery code: [javascript] $ ("select. city "). change (function () {var ccode = $ (this ). val (); $ ("select. area "). hide (); if (ccode) {$ ("select. area [citycode = "+ ccode +"] "). show () ;}}); var sltcity =$ ("select. city "). val (); if (sltcity) {$ ("select. area [citycode = "+ sltcity +"] "). show ();} is detailed below: jquery radio value, checkbox value, select value, radio selected, checkbox selected, select selected, and related settings to obtain the value of a set of radio selected items: var item =$ ('input [name = items] [checked] '). val (); get the text of the selected select item: var item =$ ("select [@ name = items] option [@ selected]"). text (); obtain the text of the selected select item: var item = $ ("select [name = items] option [selected]"). text (); or $ ("select [name = items]"). find ("option: selected "). text (); the second element in the select drop-down box is the selected value: $ ('# select_id') [0]. selectedIndex = 1; the select drop-down box value = 'val' element is currently selected: $ ("select [name = items] option [value = 'val']"). attr ("selected", "selected"); the second element of the radio Group is the selected item: $ ('input [@ name = items] '). get (1 ). checked = true; or $ ('input [name = items] '). attr ("checked", '1'); the value = 'val' of radio is the currently selected item: $ ('input [name = items] [value = 'val'] '). attr ("checked", "checked"); Value: text box, text area: $ ("# txt "). attr ("value"); multiple choice box checkbox: $ ("input [name = 'checkbox': checked]"). each (function () {var val = $ (this ). val () ;}); single-choice radio: $ ("input [type = radio] [checked]"). val (); value of select in the drop-down box: $ ('select '). val (); select selected text value in the drop-down box: $ ("select "). find ("option: selected "). text (); control form element: text box, text area: $ ("# txt "). attr ("value", "); // clear content $ (" # txt "). attr ("value", '11'); // The multi-choice box for filling content checkbox: the second element of the checkbox is checked: $ ("input [name = items]"). get (1 ). checked = true; // check $ ("input [name = items]"). get (1 ). checked = false; // check the value of the checkbox before the 'val 'element: $ ("input [name = item] [value = 'val']"). attr ("checked", true); or $ ("input [name = item] [value = 'val']"). attr ("checked", "checked"); if ($ ("input [name = item] [value = 'val']"). attr ('checked') = true) // determines whether the radio group radio has been checked: $ ("input [type = radio]"). attr ("checked", '2'); // select: $ ("# sel") for the project whose value is set to 2 "). attr ("value", '-sel3 ′); // set the value =-sel3 project to the currently selected item $ ("<option value = '1'> 1111 </option> <option value = '2'> 2222 </ option> "). appendTo ("# sel") // Add option $ ("# sel") in the drop-down box "). empty (); // clear the drop-down box jQuery to obtain the Value selected by Radio code $ ("input [name = 'Radio _ name'] [checked]"). val (); // select the Value of the selected Radio $ ("# text_id "). focus (function () {// code ...}); // event triggered when the object text_id gets the focus $ ("# text_id "). blur (function () {// code ...}); // event triggered when the object text_id loses focus $ ("# text_id "). select (); // set the Vlaue value of the text box to the selected Status $ ("input [name = 'Radio _ name'] [Value = 'value to select the value of radio '"). attr ("checked", true ); // set Radio to the selected status based on the Value. jQuery gets the Value selected for the CheckBox $ ("input [name = 'checkbox _ name'] [checked]"); // select the set of checked CheckBox elements. If you want to get the Value, you need to traverse the set $ ("input [name = 'checkbox _ name'] [checked]").. each (function () {arrChk + = this. value + ',';}); // traverses the set of the selected CheckBox elements to obtain the Value $ ("# checkbox_id "). attr ("checked"); // get the status of a CheckBox (true/false if any) $ ("# checkbox_id "). attr ("checked", true); // set the status of a CheckBox to selected (checked = true) $ ("# checkbox_id "). attr ("checked", false); // sets the status of a CheckBox to unselected (checked = false) $ ("input [name = 'checkbox _ name']"). attr ("checked", $ ("# checkbox_id "). attr ("checked"); // according to 3, 4, 5, you can analyze the meaning of the Code $ ("# text_id "). val (). split (","); // separates the Value of Text with ',' and returns an array jquery1.3.2ISDARK: $ ("input [@ type = radio] [name = ISDARK] [checked]"). val () $ ("input [name = radioname] [value = radio value]"). attr ("checked", "checked ");