0
當我檢查HTML
和JavaScript
中的複選框時,如何顯示包含動態內容的下拉列表?我已經嘗試了一些JavaScript
的內容,因爲我是編碼的初學者,希望我的測試代碼在這裏不是必需的。或者我可以使用除通常的JavaScript
以外的其他方法嗎?如何查看複選框時顯示下拉菜單?
<select id="month" name="month" class="input-text" value="<?=set_value('month',$this->input->post('month'))?>">
<option value="<?=set_value('month',$this->input->post('month'))?>"> Select Month</option>
<option value="January" <?=($this->input->post('month') == 'January')?'selected':''?>> January</option>
<option value="February" <?=($this->input->post('month') == 'February')?'selected':''?>> February</option>
<option value="March" <?=($this->input->post('month') == 'March')?'selected':''?>> March</option>
<option value="April" <?=($this->input->post('month') == 'April')?'selected':''?>> April</option>
<option value="May" <?=($this->input->post('month') == 'May')?'selected':''?>>
May</option>
<option value="June" <?=($this->input->post('month') == 'June')?'selected':''?>>
June</option>
<option value="July" <?=($this->input->post('month') == 'July')?'selected':''?>>
July</option>
<option value="August" <?=($this->input->post('month') == 'August')?'selected':''?>> August</option>
<option value="September" <?=($this->input->post('month') == 'September')?'selected':''?>> September</option>
<option value="October" <?=($this->input->post('month') == 'October')?'selected':''?>> October</option>
<option value="November" <?=($this->input->post('month') == 'November')?'selected':''?>> November</option>
<option value="December" <?=($this->input->post('month') == 'December')?'selected':''?>> December</option>
</select>