jquery中combobx的高度自动化
来源:互联网 发布:mac连不上apple store 编辑:程序博客网 时间:2024/06/03 16:27
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标签都可以设置为下拉框。
阅读全文