84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
How to set the first digit of the input input box to not be zero
小伙看你根骨奇佳,潜力无限,来学PHP伐。
Listen to the oninput event, use regular expression to determine whether the first digit is zero, and reset the input box if it is zero
Bind the input event of the input box, get the value of the input box, take the first character of the string, and determine whether it is equal to 0
Bind keyup event;
Verify whether the content when the input content length is 1 is 0 (regular expressions can be used);
Handling of different results.
Listen to the oninput event, use regular expression to determine whether the first digit is zero, and reset the input box if it is zero
Bind the input event of the input box, get the value of the input box, take the first character of the string, and determine whether it is equal to 0
Bind keyup event;
Verify whether the content when the input content length is 1 is 0 (regular expressions can be used);
Handling of different results.