您必须使用reCaptcha验证响应回调。像这样:
<scriptsrc='https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit'></script>
var RC2KEY = 'sitekey', doSubmit = false;function reCaptchaVerify(response) { if (response === document.querySelector('.g-recaptcha-response').value) { doSubmit = true; }}function reCaptchaExpired () { }function reCaptchaCallback () { grecaptcha.render('id', { 'sitekey': RC2KEY, 'callback': reCaptchaVerify, 'expired-callback': reCaptchaExpired });}document.forms['form-name'].addEventListener('submit',function(e){ if (doSubmit) { }})


