The html code is as follows:
<select name="repeat-freq">
<option value="1" selected>每周重复</option>
<option value="2">两周重复</option>
<option value="3">每月重复</option>
</select>
This is how the selected value is selected in the controller:
$('select[name="repeat-freq"]').val()
The result is that the value obtained is always "1", and other items in the selected option are still 1. I can't figure out why. Please give me an answer.
PHP中文网2017-05-15 16:52:19
http://stackoverflow.com/questions/10659097/jquery-get-selected-option-from-dropdown