Use the JQuery plug-in validate Remote, jqueryvalidate

Source: Internet
Author: User

Use the JQuery plug-in validate Remote, jqueryvalidate

JQuery. validate. js is often used in Form Verification. For Beginners, refer to the instructions for using Remote.

 

1. Basic explanation

JQuery is mainly used for DOM tree and CSS tree retrieval and subsequent operations. validate. js is a plug-in for JQuery and can be considered as an extension of JQuery in a special scenario. Validate is an extension provided for form verification.

 

2. Scenario explanation

When registering a user, the user needs to asynchronously determine whether the user name exists and give a prompt.

 

3. Use Case Studies

Html and JavaScript scripts.

1 <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> 2 

Background 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");        }    }?>

PHP code Learn. php In the background

<?php    require("BaseFunction.php");    CheckUser('firstname');?>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.