jquery中combobx的高度自动化

本文介绍如何使用jQuery EasyUI插件中的combobox组件,并通过设置panelHeight为auto实现下拉框的高度自适应。利用input和select标签均可创建下拉框,并展示了具体的配置代码示例。
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标签都可以设置为下拉框。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值