1.增加multiple属性值,name值加上[ ],不加是单选例如:
<select name="subtype[]" multiple style="height:100px;">
{volist name="sbtype" id="v"}
<option value="{$v.id}">{$v.title}</option>
{/volist}
</select>
2.设置默认多选值:
第一种方式(我这里是用的无效,我用的是第二种方式,你们可以尝试下这种)
<script>
// 初始化
$("select[name='column']").multipleSelect({
placeholder: "请选择",
selectAllText:'全选',
allSelected:'选择全部'
});
// 设置默认选中
$("select[name='column']").multipleSelect('setSelects', [1,2]);
</script>
第二种: