JQuery obtains the Text and Value selected by the Select statement. Syntax explanation: 1. $ ("# select_id "). change (function () {// code ...}); // Add an event for the Select statement. This event is triggered when one of the Select statements is selected. var checkText = $ ("# select_id "). find ("option: selected "). text (); // obtain the selected Text 3. var checkValue = $ ("# select_id "). val (); // obtain the Value selected by Select 4. var checkIndex = $ ("# select_id "). get (0 ). selectedIndex; // obtain the index value selected by Select 5. var maxIndex = $ ("# select_id option: last "). attr ("index"); // obtain the largest index of the Select statement. The Value of jQuery sets the Text and Value selected by Select: syntax explanation: 1. $ ("# select_id "). get (0 ). selectedIndex = 1; // Select 2 for items whose Select index value is 1. $ ("# select_id "). val (4); // Select 3 for items with the Select Value set to 4. $ ("# select_id option [text = 'jquery ']"). attr ("selected", true); // set the Select Text value to jQuery. Select jQuery to add/delete Select Option items. Syntax explanation: 1. $ ("# select_id "). append ("<option value = 'value'> Text </option>"); // append an Option for Select (drop-down) 2. $ ("# select_id "). prepend ("<op Tion value = '0'> Select </option> "); // insert an Option for Select (first position) 3. $ ("# select_id option: last "). remove (); // Delete the largest Option (last) of the index values in the Select statement. 4. $ ("# select_id option [index = '0']"). remove (); // delete Option (first) with the index value 0 in the Select statement. $ ("# select_id option [value = '3']"). remove (); // delete Option 5 with Value = '3' In the Select statement. $ ("# select_id option [text = '4']"). remove (); // Delete the Option of '4' Text = '4' in the Select statement // traverse option and add or remove option function changeShipMethod (Shipping) {var len = $ ("select [@ name = ISHIPTYPE] option"). length if (shipping. value! = "CA") {$ ("select [@ name = ISHIPTYPE] option "). each (function () {if ($ (this ). val () = 111) {$ (this ). remove () ;}}) ;}else {www.2cto.com $ ("<option value = '000000'> UPS Ground </option> "). appendTo ($ ("select [@ name = ISHIPTYPE]") ;}// traverses a group of select statements and sets the selected value $ ("div: first select "). each (function () {$ ("div: first select option [value = '0']"). attr ("selected", true) ;}); // obtain the selected value from the drop-down menu $ (# testSelect option: selected '). text (); or $ ("# testSelect "). find ('option: selected '). text (); or $ ("# testSelect "). val ();