更新时间:2023-02-10 20:13:18
插件 schmugin.摆脱您的 onclick 并尝试以下操作:
Plugin schmugin. Get rid of your onclick and try this:
$("input[type=radio]").click(function() {
var total = 0;
$("input[type=radio]:checked").each(function() {
total += parseFloat($(this).val());
});
$("#totalSum").val(total);
});