PHP verifies that the user registration information is valid. When key functions use JavaScript to verify the validity of user registration information, it is often necessary to test the numeric data. JavaScript can use the isNaN () function to implement the above functions.
Key functions
When verifying the validity of user registration information through JavaScript, it is often necessary to test the numeric data.
JavaScript can use the isNaN () function to implement the above functions. The following describes the function.
IsNaN () function
It is used to determine whether the parameter of this function is numeric data. If yes, False is returned; otherwise, True is returned.
Syntax
Bool isNaN (var)
The var parameter is the data to be judged.
Function implementation
After the user fills in the registration information, in order to ensure the validity of the information, it should also be verified. Verify the validity of registration information by using PHP code or JavaScript. Developers can select based on the actual situation. if you are worried about restrictions on JavaScript in the client browser, you can use PHP code, however, using this method to verify registration information is performed on the server, which wastes a lot of server resources. The application of JavaScript scripts to verify the user registration information is implemented by the client browser, which will greatly save server resources. This site verifies user registration information through JavaScript. When writing the user registration information verification module, the code that implements user registration information verification is encapsulated into the custom function chkinput login, the function is called in the onSubmit event marked in form. the code of the Chkinput login () function is as follows.
The following are
The following are Include_once ("top. php "); ?>
Include_once ("left. php "); ?> |
|
|
|
|