function checkCode() {
var CheckCode = jQuery("#txtCode").val();
var msgCtrl = jQuery("#errcc");
msgCtrl.html('验证中...');
if (CheckCode == "") {
msgCtrl.html('请填写验证码!');
return;
}
var flag = false;
jQuery.ajax({
type: 'POST',
url: 'tools/Check.aspx',
data: 'action=checkform&type=codeValid&values=' + escape(CheckCode),
async: false,
dataType:"json",
success: function (json) {
if (json)
{
if (json.status == "y") {
flag = true;
msgCtrl.html("");
}
else {
msgCtrl.html('' + json.info + '');
flag = false;
}
}
},
error: function () {
msgCtrl.html('Error!');
flag = false;
}
})
return flag;
}