Gets the text of the Select selected item: var item = $ ("select[@name =items] option[@selected]"). Text ();
Gets the text of the Select selected item: var item = $ ("Select[name=items] option[selected]"). Text (); or $ ("Select[name=items]"). Find ("option:selected"). Text ();
Value value of the dropdown box select: $ (' select '). val ();
Dropdown box Select the selected text value: $ ("select"). Find ("option:selected"). Text ();
Example
<! DOCTYPE html>
<meta charset= "Utf-8" >
<title>www.111cn.net</title>
<body>
<select name= "type" onchange= "Show_sub (this.options[this.options.selectedindex].text)" >
<option value= "0" > Please select main category </option>
<option value= "1" >1111</option>
<option value= "2" >22222</option>
</select>
</body>
<script>
function Show_sub (v) {
Alert (v);
}
</script>
The example above is when we onchange change the Select to get the value of the option selected.