我有下拉列表已經是這樣的:如何在yii框架中將類名設置爲dropdownlist?
<select id="cateActive" name="cateActive">
<option selected="selected" value="1">Active</option>
<option value="0">Deactive</option>
</select>
Yii框架代碼:
<?php
echo CHtml::dropDownList('cateActive', '',
array('1' => 'Active', '0' => 'Deactive'),
array('options' => array($model->cate_active=>array('selected'=>true))));
?>
我怎麼能有下拉列表有類是這樣的:
<select id="cateActive" name="cateActive" class="myclass">
<option selected="selected" value="1">Actyclassive</option>
<option value="0">Deactive</option>
</select>
三江源非常多你的回答
感謝它解決 –