combobox select .change onSelect事件触发

我现在要完成的功能是:
有两个下拉框,当地一个下拉框选择了第一个选项时,第二个下拉框不可用,否则就可用。









用了jQuery easyUI提供的onSelect方法。
如下:js文件:
$('#select1id').combobox({
                                url:"getClose.do",
                                editable:false,
                                panelWidth:130,
                                width:130,
                                onSelect:function(record){
                                        var peo = $('#closeBugChoose').combobox('getValue');
                                        
                                        if(peo=="1"){
                                                $('#select2id').combobox({
                                                        disabled:true
                                                });
                                        }
                                        else{
                                                $('#select2id').combobox({
                                                        disabled:false
                                                });
                                        }
                                }
                        });

这样就可以了。

posted on 2015-11-29 21:34  wdcwy  阅读(6400)  评论(0编辑  收藏  举报

导航