0
我有一个问题,我在yii中是一个新手,我吸入ajax。 假设我有警予形式看起来像:从ajax获取yii表单中的字段的值
<?php echo $form->dropDownListRow($model,'study_type_id', $studyTypeList, array(
'options'=>array($default['studyTypeId']=>array('selected'=>true)),
'id'=>'study-type-list',
'class'=>'span5 study-create-input')
); ?>
说,在下拉菜单中选择向下是“studytype1”,“studytype2” ..等..
如何访问这些选项字符串形式..(对不起的解释)..在ajax脚本说..
Yii::app()->clientScript->registerScript('generateStudyName', "
var updateStudyName = function() {
var studyType = ??//I want to access the value selected in the drop down list
that i hope to use
}");
谢谢!
非常感谢! – muffin