1 combobox中可以设置高度自动化。就是panelHeight的属性为auto即可。设置为高度随值自动变化。
如:$(function(){
$("#combobox1").combobox({
width:100,
//height:"auto",
panelHeight:"auto",
valueField:"id",
textField:"text",
url:"./json/combobox_json.json"
});
$("#select1").combobox({
width:100,
//height:100,
panelHeight:"auto",
valueField:"id",
textField:"text",
url:"./json/combobox_json.json"
});
})
jsp---------
<input type="text" id="combobox1" name="combobox1" value=""/>
<br/><br/>
<select id="select1" name="select1">
没有height属性。设置panelHeight属性才行。设置为auto值就是自动化高度。
combobox通过input和select标签都可以设置为下拉框。
如:$(function(){
$("#combobox1").combobox({
width:100,
//height:"auto",
panelHeight:"auto",
valueField:"id",
textField:"text",
url:"./json/combobox_json.json"
});
$("#select1").combobox({
width:100,
//height:100,
panelHeight:"auto",
valueField:"id",
textField:"text",
url:"./json/combobox_json.json"
});
})
jsp---------
<input type="text" id="combobox1" name="combobox1" value=""/>
<br/><br/>
<select id="select1" name="select1">
没有height属性。设置panelHeight属性才行。设置为auto值就是自动化高度。
combobox通过input和select标签都可以设置为下拉框。
本文介绍如何使用jQuery EasyUI插件中的combobox组件,并通过设置panelHeight为auto实现下拉框的高度自适应。利用input和select标签均可创建下拉框,并展示了具体的配置代码示例。

1686

被折叠的 条评论
为什么被折叠?



