本文主要是介绍select2固定值使用,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
$("#spstarselect").select2({placeholder: "请选择", allowClear: true, data: [{id: 1, text: '一星'}, {id: 2, text: '二星'}, {id: 3, text: '三星'}, {id: 4, text: '四星'}, {id: 5, text: '五星'}] });
<input class="form-control spstarselect select2" type="hidden" id="spstarselect" name="spstarselect"/>
信息: 星级:2
这篇关于select2固定值使用的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!