easyui的combobox多选和单选回显

需要的js,css
<script type="text/javascript" src="../js/jquery1.8.js"></script>
<link rel="stylesheet" type="text/css" href="../css/easyui.css"/>
<script src="../js/jquery.easyui.min.js" type="text/javascript"></script>


<input id="total" name="total"  style="width: 150px;height: 30px"  class="easyui-combobox" >

在onLoadSuccess函数中写
多选
//多选回显
var industryCodes =  “1,2,3,4,5”;
 if (industryCodes.length>0) {
       $("#total").combobox("setValues",industryCodes.split(','));
 }
2 单选的时候就用这个
$('#total').combobox('select',value);

猜你喜欢

转载自blog.csdn.net/weixin_43887789/article/details/90257759
今日推荐