Jquery.validate is a validation framework for jquery, with the advantage of jquery, we can quickly verify some of the common input, we can expand our own verification methods, and the internationalization also has a good support
JQuery.validate.js is frequently used in form validation, and is a beginner for remote use.
. Basic explanation
jquery is primarily used for the retrieval of dom trees and CSS trees and a set of methods for subsequent operations, JQuery.validate.js is a plug-in to jquery that can be thought of as an extension of jquery in a particular scenario, and validate is the extension that is provided for form validation.
. Scene explanation
Users to register users, to the asynchronous judgment of the existence of the user name, give a hint information.
. Learn through case studies
Script that combines HTML and JavaScript.
<! DOCTYPE HTML PUBLIC "-//wc//dtd XHTML. transitional//en "" Http://www.w.org/TR/xhtml/DTD/xhtml-transitional.dtd ">
Backstage PHP code basefunction.php
<?php
function Writelog ($msg)
{
$filename = dirname (__file__). " \\Debug.log ";
$handler = null;
if ($handler = fopen ($filename, ' ab+ '))!== false)
{
fwrite ($handler, \ n). ' ['. Date (' y-m-d h:i:s '). '. ' \ t ". $msg);
Fclose ($handler);
}
function CheckUser ($UserName) {
if ($_request[$UserName] = = ' php ') {
exit ("false");
}
else{
exit ("true");
}
? >
Backstage PHP code learn.php
<?php
require ("basefunction.php");
CheckUser (' FirstName ');
? >
The above is a small set to introduce the jquery validate Plug-ins remote usage of the relevant knowledge, hope that the above help!