我想做的是回答这个问题 (A+B+C) * 4
我现在不知道如何让它与我当前的代码一起正常工作,它的设置如下:
<script>
(function () {
function calculateScoring(man, boy, girl) {
man = parseFloat(man);
boy = parseFloat(boy);
girl = parseFloat(girl);
return (man + boy + girl * 4);
}
var Scoring = document.getElementById("diveScore");
if (Scoring) {
Scoring.onsubmit = function () {
this.score.value = calculateScoring(this.man.value, this.boy.value, this.girl.value);
return false;
};
}
}());
</script>