如何调整 easyui combobox 宽度?

2025-02-18 13:55:54
推荐回答(2个)
回答(1):

combobox所有属性都继承combo组件,而在jquery.easyui.min.js中;
参考如下:
$.fn.combo.defaults = $.extend({}, $.fn.validatebox.defaults, {
width : "auto",
height : 22,
panelWidth : null,
panelHeight : 200,
multiple : false,
separator : ",",
editable : true,
disabled : false,
hasDownArrow : true,
value : "",
delay : 200,
keyHandler : {
up : function() {
},
down : function() {
},
enter : function() {
},
query : function(q) {
}
},
onShowPanel : function() {
},
onHidePanel : function() {
},
onChange : function(_791, _792) {
}
});

回答(2):

$('#combobox').combobox({
url:"ajax/getData.php",
valueField:'id',
textField:'text' ,
width:100});