Ext comobox

it2022-05-09  28

 var result;

    Ext.onReady(function(){

 

        comboFunction = new Ext.form.ComboBox({

            typeAhead: true,

            triggerAction: 'all',

            transform:'cbFunction',

            width:150,

            maxHeight:70,

            forceSelection:true,

            emptyText:' '

        });

       

        var allData = comboFunction.store.data;

result = new Array();

        for (var i = 0; i < allData.length; i++)

        {

            var item = allData.get(i).data;

            result.push([item["value"], item["text"]]);

        }

});

 

 

    function clearInput()

    {

        document.getElementById('tbDev').value = "";

        comboFunction.clearValue();

        comboFunction.store.loadData(result);

        //document.getElementById('cbFunction').selectedIndex = 0;

        comboFunction.setValue(document.getElementById('hidCBFunctionFirst').value);

    }

转载于:https://www.cnblogs.com/nanshouyong326/archive/2009/01/13/1374710.html


最新回复(0)