默认情况下,在下拉列表中选择第一个选项。我想取消选择它。以下是我的代码
<label>Select from below</label>
<div>
<select name="subjects[]" class="ms" id="subjects" class="form-control ">
<option value=''>SELECT</option>
<?php foreach ($subjects as $s) {
echo '<option value=' . $s->sb_id . '>' . $s->subject_name . '</option>';
} ?>
</select>
现在这里也正在选择“SELECT”
答案 0 :(得分:0)
<label>Select from below</label>
<div>
<select name="subjects[]" class="ms" id="subjects" class="form-control ">
<option selected="true" disabled="disabled">SELECT</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>