Your job is to make a half-plus-seven calculator.
Someone enters their age, and you tell them the youngest and the oldest that comport with the half-plus-seven rule.
Steps:
- Make an HTML form with three input files, named age, min, and max
- Make a JavaScript function that is run when the age field changes (maybe use onkeyup, or onchange)
- Have that function fill in the min field, with 1/2 * age + 7
- If the min field is under 18, replace the number with some warning
- Have that function fill in the max field with (age-7)*2
- If the max field is under 18, replace the number with some warning
- If the entered age is less than 18, change the background with something suitable.
- If the entered age is more than 50, change the background to something suitable.
- Hard Ones
- Make a sound then they offer bad input
- Make a marquee appear and disappear based on input correctness
- Something funny
Sample form to work from.
Due: Mon Oct 23rd