Thinking of using onkeyup or some other method to achieve it. Ask God for answers.
This involves js.
For events, just use onkeyup of the keyboard key event.
When the button is lifted, a judgment is made in the event processing function: whether the first character in the input box is "-", if the value of the color attribute of the style attribute of the input element is modified, it is green, otherwise it is red. . If it is jQuery, just set the .css() method
and it only needs to be judged once during the continuous input process.
This involves js.
For events, just use onkeyup of the keyboard key event.
When the button is lifted, a judgment is made in the event processing function: whether the first character in the input box is "-", if the value of the color attribute of the style attribute of the input element is modified, it is green, otherwise it is red. . If it is jQuery, just set the .css() method
and it only needs to be judged once during the continuous input process.
This involves js.
For events, just use onkeyup of the keyboard key event.
When the button is lifted, a judgment is made in the event processing function: whether the first character in the input box is "-", if the value of the color attribute of the style attribute of the input element is modified, it is green, otherwise it is red. . If it is jQuery, just set the .css() method
and it only needs to be judged once during the continuous input process.