in html:
<input id="iCheck"
class="easyui-switchbutton"
data-options="onChange:iCheckChange"
>
<input id="iCombo"
class="easyui-combobox"
data-options="mode:'remote'
, disabled: true
, required: false
, loader: ...
"
>
脚本中的
function iCheckChange(aChecked){
$('#iCombo').combobox(aChecked?'enable':'disable').combobox('options').required = aChecked;
};
代码:https://jsfiddle.net/0dbog4of/4/
如何将iCombo重新整理为iCombo2? 改变所需的&#39;选项不要重绘组件:(
答案 0 :(得分:0)
<script>
function iCheckChange(aChecked){
$('#iCombo').combobox(aChecked?'enable':'disable');
$('#iCombo').combobox('options').required = aChecked;
$('#iCombo').combobox('textbox').validatebox('options').required = aChecked;
$('#iCombo').combobox('validate');
};
</script>