easyuicombobox 选择触发事件 onselect

项目中碰到使用easyui-combobox下拉框,但是在选择时候要触发选中事件,网上找了好多贴吧,好多都是给出这样解决方式

$("#id").combobox({  

   onSelect: function () {   

    }  

});

但是,我使用的是<input>标记创建组合框,试了了很多次上面的方法好像都不管用,如果有大神会可以指导一下。

下面我提供另一种方法;

<input class="easyui-combobox" id="scenes" name="scenes" editable="false" style=" 150px"
data-options="valueField: 'value',textField: 'label',data: [{label: '场景一',value: '1'},{ label: '场景二',value: '2'}],panelHeight:'auto',onSelect:function(){changeScenes();}" />

再在js中写一个changeScenes()方法。

原文地址:https://www.cnblogs.com/congyu/p/7880133.html