Input effect: When the mouse inputs text in the input, the internal text effect is changed, and the input text effect is
Mainly used attributes: onpropertychange events (events triggered when the attribute is changed) and oninput attributes (events occurred when the input is input)
The onpropertychange event is an exclusive IE event.
The oninput attribute is compatible with non-ie browsers.
For example:
Code
<Input id = "Login_username" class = "Login_input" name = "Login_username" type = "text" placeholder = "input username" onpropertychange = "this. style. color = 'black' "oninput =" this. style. color = 'black' "> <input id =" Login_pwd "class =" Login_input "name =" Login_pwd "type =" password "placeholder =" Enter password "onpropertychange =" this. style. color = 'black' "oninput =" this. style. color = 'black' ">
Original Style:
Enter the effect before modification:
Enter the following results: