I have two form fields money
and years
that need to output a number into a third field cv
.
Ideally while the first numbers are being entered but I'm OK with it happening after a button is pressed as well
<FORM name="salary">
<input type="number" size=12 name="money">
<input type="number" size=12 name="years">
<input type="number" size=12 name="cv">
</FORM>
The math involved would be the following.
(money * years) - (money * years) x = cv
Where:
- x equals 0 if years equals 1
- x equals .2 if years equals 2
- x equals .45 if years equals 3
- x equals .6 if years equals 4
- x equals .65 if years equals 5
- x equals .75 if years equals 6