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 ();}}
}