谁能告诉我如何为以下验证码编写自定义验证器?我是 jquery 的新手,还没有编写任何自定义验证器。我需要将此自定义验证器与默认验证器一起使用。我试着写,但它没有用。请帮忙
challengeField = $("input#recaptcha_challenge_field").val();
responseField = $("input#recaptcha_response_field").val();
var html = $.ajax({
type: "POST",
url: "recaptcharesponse.jsp",
data: "recaptcha_challenge_field=" + challengeField + "&recaptcha_response_field=" + responseField,
async: false
}).responseText;
//console.log( html );
$("#prtCnt").html("");
return true;
} else {
$("#prtCnt").html("<font color='#D31145'>Please try again.The characters you entered didn't match the word verification</font>");
Recaptcha.reload();
return false;
}
谢谢