1. 程式人生 > >easyui中combobox 取值

easyui中combobox 取值

pre com 顯示 field pen eas eth eight fun

<input id="cmbstrTrainType" class="easyui-combobox" name="cmbstrTrainType" style="width:102px;height: 32px;" data-options="
url:‘/Page/Ashx/GetCmbInfo.ashx?strFun=GetstrTrainTypeEasyUI‘,
method:‘get‘,
valueField:‘strTypeName‘,
textField:‘strTypeName‘,
panelHeight:‘300‘

"/>

//需要id和name,兩個想等,不然下面取不出來

function
beforeSave() { //取ID var jjj= $(‘#cmbstrTrainType‘).combobox(‘getValue‘); //取顯示的name var jjkj= $(‘#cmbstrTrainType‘).combobox(‘getText‘); }

easyui中combobox 取值