Good afternoon Friends
I have an input with the name of MARGIN, where a value is displayed according to some calculations that are made ... I need the input to change the color to red if this value is less than 25, if it is bigger it maintains her color (white) ...
NOTE: I have the input value, where this input the sellers manipulate the value of a product trying to always keep the margin above 25%, but if it download I want the color to change, all without refresh. >
<label for="valor_unitario">Vlr. Unit.</label>
<input type="text" name="valor_unitario" id="valor_unitario" style="text-align: center" required>
<label for="quantidade">Qtd.</label>
<input type="text" name="quantidade" id="quantidade" style="text-align: center" required>
<label for="valor_total">Vlr. Total</label>
<input type="text" name="valor_total" id="valor_total" readonly>
<label for="margem">Margem</label>
<input type="text" name="margem" id="margem" style="text-align: center" readonly>
So that they do not get lost, the total value input shows the value of (unit value * quantity) .. what interests us is unit value and margin