0
後這是單選按鈕設置單選按鈕的值及其變化的事件不工作
<div class="col-md-6">
<div class="form-group">
<label class="radio-inline"><input type="radio" value="0" name="EditDepositType">نقد</label>
<label class="radio-inline"><input type="radio" value="1" name="EditDepositType">چیک</label>
</div>
</div>
</div>
的代碼設置它的值從DB
$('input[name=EditDepositType]').val(DepositType).prop('checked','true');
其更改事件
$('input[type=radio][name=EditDepositType]').change(function() {
if (this.value === '1') {
$('.chequeData5').show();
$('.chequeData3').show();
$('.chequeData4').show();
}
else{
$('.chequeData5').hide();
$('.chequeData3').hide();
$('.chequeData4').hide();
}
});
當我檢查收音機按鈕通過檢查元素設置其值後,兩個單選按鈕具有相同的值
什麼都沒有發生 –