日期:2014-05-16  浏览次数:20446 次

Extjs下ComboBox实现级联
<SPAN style="FONT-SIZE: 18px">    //**测试下拉框级联**     

     var storedm = new Ext.data.Store({   //队名称下拉框     

         proxy: new Ext.data.HttpProxy({       

       url: '../servlet/CommonMethod?command=getdm'      

         }),       

         reader: new Ext.data.JsonReader({       

         root: 'dms',       

         id: 'id'   

         }, [       

             {name: 'id', mapping: 'id'},       

             {name: 'mc', mapping: 'mc'}       

         ])       

        });                  

      var storejh = new Ext.data.Store({  //井号选择下拉框     

         proxy: new Ext.data.HttpProxy({       

             url: '../servlet/CommonMethod?command=getjh' //这里是参数可以顺便写,这个数据源是在第一个下拉框select的时候load的     

         }),       

         reader: new Ext.data.JsonReader({       

         root: 'jhs',       

         id: 'jh'      

         }, [       

             {name: 'jh', mapping: 'jh'},       

             {name: 'jm', mapping: 'jm'}       

         ])       

        });   

 

</SPAN> 

//**测试下拉框级联**       
var storedm = new Ext.data.Store({   //队名称下拉框 
proxy: new Ext.data.HttpProxy({                      url: '../servlet/CommonMethod?command=getdm'        
    }),            
reader: new Ext.data.JsonReader({               root: 'dms',                      &nbs