2016-06-07 61 views
0

當我在OPTGROUP選項單擊,在其他OPTGROUP所有選項都選得過:錯誤與引導選OPTGROUP

<select id="ressource_regions_region_id" multiple> 
     <optgroup label="one-three"> 
     <option>One</option> 
     <option>two</option> 
     <option>three</option> 
     </optgroup> 
     <optgroup label="four-six"> 
     <option>four</option> 
     <option>five</option> 
     <option>six</option> 
     </optgroup> 
     <optgroup label="seven-nine"> 
     <option>sevent</option> 
     <option>eight</option> 
     <option>nine</option> 
     </optgroup> 
    </select> 

在JS:

$('#ressource_regions_region_id').selectpicker(); 

像這樣: bug bootstrap-select

回答

0

嘗試爲選項添加值..

<optgroup label="one-three"> 
    <option value="One">One</option> 
    <option value="two">two</option> 
    <option value="three">three</option> 
</optgroup> 
+0

同樣的問題,這是我認爲的JavaScript問題.. – Balita