html文件里的简单的单选框:
<div class="form-group has-feedback"> 账单分类:<br/> <input type="radio" class="control-label" id="richang" value="日常支出" name="category" checked/>日常支出 <input 香港vps type="radio" class="control-label" id="dae" value="大额支出" name="category" />大额支出</div>?bootstrap模态框里的单选框:(本来还以为和普通的不一样,我是前端小菜哈)
<div class="form-group"> <label for="category" class="control-label">账单分类:</label><br /> <input type="radio" class="control-label" id="richang" value="日常支出" name="category" checked/>日常支出 <input type="radio" class="control-label" id="dae" value="大额支出" name="category" />大额支出</div>但它们在js里取值是同一种方式:
var category = $('input:radio[name="category"]:checked').val();?
71685784