ComboBox的基本用法


var url=""/獲取數據的url地址

var param =new  Object();//參數

$.post(url,param,function(data){//回掉函數

if(data){

var combo_set = new Object();

    combo_set['selectBoxHeight'] = 195;
                combo_set['selectBoxWidth'] = 100;
                combo_set['valueField'] = 'code';
                combo_set['textField'] = 'title';
                combo_set['hideGridOnLoseFocus'] = true;
                combo_set['autocompleteAllowEmpty'] = true; //空格
                combo_set['onSelected'] = function (newvalue){
                    //當選中時觸發事件

       //$('#'+id).empty();--------------------清空指定的元素(會把表單元素也清空了)
                    //$('#'+id).append('<input id="B_JYPH" class="w_90_p" type="text">');----------添加表單元素到指定的元素中
                };
                combo_set['data'] = data['Rows'];//設置數據
                var priceareaBox = $("#B_JGQJ").ligerComboBox(combo_set);//給指定的輸入框元素添加ligerComboBox對象

 

}

})


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM