For example, I have to verify that he can not be empty specific JS and php how to verify it is the point of submission that the moment does not conform to the mouse leave also to remind me that every time you know to verify but the specific process sequence do not know how to walk is the definition of the method ah or how to ask the high finger teaching
Reply content:
For example, I have to verify that he can not be empty specific JS and php how to verify it is the point of submission that the moment does not conform to the mouse leave also to remind me that every time you know to verify but the specific process sequence do not know how to walk is the definition of the method ah or how to ask the high finger teaching
Recommended to use angular on the JS side, combined with w5c validate, it is easy to achieve, save 70% code volume than the above several answers
Of course, the server should do another test.
Front-end JS or jquery do a school check, combined with form events to write code. Back-end PHP to receive the $_post is doing a school check. Don't feel trouble because it can be forged.
Front-end form calibration Recommended plugin: Official dome
and download address: Download address
First of all, JS verification is only to improve the user experience, PHP must go through the verification process, which is safe.
Verification process, depending on your needs, such as you want to leave the mouse to verify, then in the input box monitoring Blur event, the event to determine whether the values meet the requirements, non-compliance with the return of false, to do the corresponding hint, if the requirements of the direct submission to the background, PHP to do the verification of the values of each.
Mobile phone code word, only say the idea does not knock code.
Before submitting a decision, it is not necessary to use any other frame, when you click the Submit button to judge the