クリック時にラジオボタンの値を取得する方法ID
。
<script>
$(document).ready(function() {
$('label').click(function() {
var total = 0;
$('.option:checked').each(function() {
total += parseInt($(this).val());
});
$('.sub-total-t').html('$' + total);
});
});
</script>
このスクリプトは->代わりvalue
にどのように割り当てるのですか?ID
<label><input type="radio" name="print" class="option" id="25" value="p10"/> Starter 500 </label>