javascript - js plug-in, question about input box placeholder
给我你的怀抱
给我你的怀抱 2017-07-05 11:03:40
0
2
815

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?

给我你的怀抱
给我你的怀抱

reply all(2)
ringa_lee

Onfocus event modifies the value of the input.
input type=number restricts input to numbers only

某草草

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template