combobox select .change onSelect事件触发 - wdcwy

时间:2024-02-21 12:24:26

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
                                                });
                                        }
                                }
                        });

这样就可以了。