Change td cell colour based on a number typed into an input field : <p>I have a form.  In the form I have number input fields.  The minimum number is 1 and the maximum is 5.  All good so far.  The use puts in a number (between 1-5) based on a risk assessment. 1 being low risk and 5 being high risk.  If the user puts in a 1 I want the cell that the input field is in to turn green.  If they input 5 I want it to turn red.  The colour can start as green when the form first appears (though I am happy for it to be no colour until the field is first populated)  numbers 1 and 2 are both green. 3 changes to yellow 4 to orange then 5 to red. Sounds simple enough but Im a little lost.  Can someone take me by the hand and lead me through it.  I have researched it but I have not found anything that gets me any closer. </p>
