Phpjquery verification code

Source: Internet
Author: User
This tutorial mainly uses jquery ajax to implement advance verification of the jqueryphp verification code without refreshing the code. the instance code is as follows :? Php calls this page. if the following formula is set up, the verification code image is generated... this tutorial mainly uses jquery ajax to implement advance verification of the jquery php verification code without refreshing the code. The example code is as follows:

 

The verification code displayed on the static page is:

Verification code:

The ajax verification code of jquery is as follows:

$.post("session.php",       {reg_code:$("#reg_code").val()},       function(data){       if(data === "1"){        //do...       }else{        do...      }     } );

The php page for ajax verification is called session. php. the code is as follows:

  



Article URL:

Reprint ^ at will, but please attach the tutorial address.

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.