【发布时间】:2015-03-01 22:59:26
【问题描述】:
我想要做的是让您可以选择选项 1 或任意数量的其他选项。所以选项1应该是“radio”,其他应该是普通的“checkboxes”。
我的代码:
<div class="input-group">
<label>Presentation:</label>
<input type="radio" name="presentation" id="presentation-0" value="correct">
Option 1
<input type="checkbox" name="presentation" id="presentation-1" value="Incorrect1">
Option 2
<input type="checkbox" name="presentation" id="presentation-2" value="Incorrect2">
Option 3
<input type="checkbox" name="presentation" id="presentation-3" value="Incorrect3">
Option 4
</div>
如果我这样做,您仍然可以与其他选项同时选择选项 1。有谁知道我怎样才能得到想要的结果? (因此,当您选择另一个选项时,选项 1 会被取消选择/当您选择选项 1 时,选项 2-4 会被取消选择)
【问题讨论】:
标签: html twitter-bootstrap checkbox radio-button