1. jquery Gets the text value of the currently selected select
var checktext=$ ("#slc1"). Find ("option:selected"). Text ();
2. jquery Gets the value of the currently selected select
var checkvalue=$ ("#slc1"). Val ();
3. jquery Gets the index value of the currently selected select
var index=$ ("#slc1"). Get (0). SelectedIndex;
4. jquery sets the item with the index value of 1 as the currently selected item
$ ("#slc1"). Get (0). selectedindex=1;
5. jquery Set value 2 is the currently selected item
$ ("#slc1"). Val (2);
6. jquery set the text value to "Ivy Garden" as the current selected item
$ ("#slc1 option[text= ' green garden w ']"). attr ("selected", true);
7. Append an option to the specified Select drop-down box (append to the end)
$ ("#slc2"). Append ("+i+");
8. Insert an option (insert to first position) for the Select drop-down box
$ ("#slc2"). Prepend ("Please select");
9. jquery Delete the last option of the Select drop-down box
$ ("#slc2 option:last"). Remove ();
Select Change value with OnChange method
<SelectID= "SELECTW"onchange= "Magchange ()"> <optionvalue= "2"></option> <optionvalue= "1">Weibo</option> </Select>
Gets the value of the current selection when selected
function Magchange () { var checkvalue=$ ("#selectw"). Val (); return CheckValue;}
jquery action method for the text and value values of the Select drop-down box