2 回答

TA貢獻1868條經驗 獲得超4個贊
給每行單選按鈕一個不同的名字
<div class="row">
<input type="radio" name="rowA" /> Label A
<input type="radio" name="rowA" /> Label B
<input type="radio" name="rowA" /> Label C
<input type="radio" name="rowA" /> Label D
</div>
<div class="row">
<input type="radio" name="rowB" /> Label A
<input type="radio" name="rowB" /> Label B
<input type="radio" name="rowB" /> Label C
<input type="radio" name="rowB" /> Label D
</div>

TA貢獻1909條經驗 獲得超7個贊
javascript代碼
<script src="https://code.jquery.com/jquery-2.2.4.js"></script>
$(document).on('click','.radio-class',function(){
$this = $(this);
// uncheck all other radio inputs except this one
$('.radio-class').not($this).prop('checked', false);
});
單選按鈕
<asp:RadioButton ID="RadioButton1" GroupName="radio-class" runat="server" />
添加回答
舉報