我试图在更改时保存选择下拉列表的表单值?
HTML
<select class="form_select" id="typeof_dwelling" name="typeof_dwelling">
<option value="-1">All </option>
<option value="APTU">Condos</option>
<option value="HOUSE">Houses</option>
<option value="TWNHS">Townhouses</option>
<option value="LOFTS">Lofts</option>
<option value="LND">Land</option>
</select>
脚本
<script>
$(document).ready(function () {
$('select#typeof_dwelling').change(function () {
alert($(this).val());
}
});
</script>
如何使用当前选项值显示此警报?