bootstrap 3 のcheckbox-inline

     <div class="form-group">
     <p class="control-label"><b>趣味</b></p>
      <div class="checkbox-inline">
        <input type="checkbox" value="soccer" name="interests" id="interest_soccer">
          <label for="interest_soccer">サッカー</label>
      </div>
      <div class="checkbox-inline">
        <input type="checkbox" value="basketball" name="interests" id="interest_basketball">
          <label for="interest_basketball">バスケットボール</label>
      </div>
      <div class="checkbox-inline">
        <input type="checkbox" value="baseball" name="interests" id="interest_baseball">
          <label for="interest_baseball">野球</label>
      </div> 

nameが同じ場合のみ、択一選択できる。 

原文地址:https://www.cnblogs.com/vonk/p/4287309.html