VaR F = false;
$. Ajax ({
Type: "Post ",
Async: false,
URL: U ('Public/rightname '),
Data: "username =" + value,
Success: function (data ){
If (Data = "1 "){
$ ("#" Effectip0000.addclass('errors'0000.fadein().html ('nonexistent ');
F = false;
} Else if (Data = "2 "){
$ ("#" Effectip0000.removeclass('errors'0000.addclass('right'0000.fadein().html ('');
F = true;
}
}
});
Alert (f );
Multi-parameter transfer:
Data: {"param1": "value1", "param2": "value2 "}
Certificate -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Check whether the completion date is earlier than the project date
VaR pro_build = false;
$. Ajax ({
Type: "Post ",
Async: false,
URL :"? Moduleid = 50 & M = Achievement & Action = check_pro_build_date & projectid = "+ $ (" # projectid "). Val () +" & ach_finish_date = "+ ach_finish_date,
Success: function (data ){
If (data. State = "9 "){
Pro_build = true;
Pai.dialog.tips(data.reason,0.8 'error.gif '). Lock ();
Document. getelementbyid ("ach_finish_date"). Focus ();
$ ("# Dach_finish_date" ).html ("the completion date cannot be earlier than the project date"). addclass ("custom_error ");
}
},
Datatype: 'json'
});
If (pro_build = true ){
Return false;
}