As shown in the picture above, when focused, the input box will display a horizontal placeholder. Enter as many digits as the placeholder has, and if it is a phone number, you can limit the input to only numbers;
When lost When in focus, the placeholder value is displayed;
Question: Has anyone used a similar plug-in? What is the implementation principle?
ringa_lee2017-07-05 11:05:40
Onfocus event modifies the value of the input.
input type=number restricts input to numbers only
某草草2017-07-05 11:05:40
When binding the input event to the input box, judge the content through regular expressions, and set the value of the input box in real time to prevent input if it is illegal. The placeholder may be a p simulation. I have never used this plug-in and it is purely a personal opinion.