一背景:
通常原声的select下面想要触发其onchange事件是比较容易的
<select id="aa" οnchange="getVal()">
<option value="0">a</option>
<option value="1">b</option>
</select>
直接写函数function getVal()就行了。
二 实现:
根据前面select前后关联:根据选择不同,后面的结束时间可以赋值或者是必填
$('#Type').combobox({
onChange: function (newValue, oldValue) {
var licencetype=$('#Type').combobox('getValue');
$('#endDate').datebox({'required':true});
$('#endDate').datebox('setValue',enddate);
。。。。
就是:注册一个函数
.combobox('getValue') 就是获取select选中的值
.datebox({'required':true}); 就是指定的值必填
.datebox('setValue',enddate); 就是赋值