【发布时间】:2013-11-01 17:12:56
【问题描述】:
我正在使用 Bootstrap 的 JavaScript 按钮来设置一些单选按钮的样式,但我似乎无法将初始按钮设置为选中状态。
这是我的代码:
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-info">
<input checked="checked" type="radio" id="match-three" name="options">Three numbers
</label>
<label class="btn btn-info">
<input type="radio" name="options" id="match-four">Four numbers
</label>
</div>
第一个按钮有checked="checked",但它的样式没有被选中。
单击事件后按钮的样式设置为 OK,因此我不确定初始加载时出了什么问题。
Bootply 版本在这里:http://bootply.com/89566
【问题讨论】:
标签: twitter-bootstrap twitter-bootstrap-3