<select id="facetList" style="width:120px;" class="text ui-widget-content ui-corner-all">
<?php
foreach($claAddArray as $k => $v)
{
echo "<option value=\"$k\">$v</option>";
}
?>
</select>
$("#btnSubmit").click(function() {
var $fId = ?????????????????
});
jQuery's .val() will return the currently selected option's value if run on the select list itself. In your case $("#facetList").val();
use $("#facetList option:selected").text();
for the text of the option tag.
document.getElementById('facetList').options[document.getElementById('facetList').selectedIndex].value
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.