Question about the Chinese version of Remote verification in JQuery's Validation plug-in

Source: Internet
Author: User

Question about the Chinese version of Remote verification in JQuery's Validation plug-in

Contenttype: "application/x-www-form-urlencoded; charset = UTF-8 ",

Added to the parameters of the ajax request, the result does not work this time.

After observing the result of fiddler for multiple times and finding it invalid, I had to open jquery. validation. webpage special effect to seek answers.

In the remote code, I found that:

 

...

Var data = {};
Data [element. name] = value;
$. Ajax ($. extend (true ,{
Url: param,
Mode: "abort ",
Port: "validate" + element. name,
Datatype: "webpage effect on ",
Data: data,


....


To prevent the validation plug-in from processing input data, I tried to use my own option to overwrite the option definition of the validation:

Copy the Code as follows:

Remote :{
Url: "ajax. asp tutorial x? A = xxx ",
Type: "post ",
Datatype: "json ",
Contenttype: "application/x-www-form-urlencoded; charset = UTF-8 ",
Data: {txt1: function () {return $ ("# txt1"). val ();}}
}

 

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.