因此,這裏是我的標記引導BTN-組不改變單選按鈕
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary">
<input type="radio" name="account-type" id="optionsRadios1" value="1"> <span class="glyphicon glyphicon-user"></span>
User</label>
<label class="btn btn-primary active">
<input type="radio" name="account-type" id="optionsRadios2" value="2" checked> <span class="glyphicon glyphicon-eye-open"></span>
Special user</label>
<label class="btn btn-primary">
<input type="radio" name="account-type" id="optionsRadios2" value="3"> <span class="glyphicon glyphicon-home"></span>
Agency</label>
</div>
它使得一切都很好,問題是,如果我選擇值3,也不會迎來第三單選按鈕爲選中它,或者選擇其他選項,所以當我提交表單時,選擇哪個選項並不重要,默認選中的選項將被提交。
任何提示?
這與問題無關,他的單選按鈕名稱更正確 – Cirou