$("#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