페이지에 여러 개의 Google captcha가 있습니다. 코드 : 페이지에Google recaptcha 콜백이 여러 reCAPTCHA와 작동하지 않습니다.
<script>
var qqqq =function(captcha_response){
console.log('?')
}
var CaptchaCallback = function(){
$('.g-recaptcha').each(function(index, el) {
grecaptcha.render(el, {'sitekey' : '{{ recaptcha_key}}', 'callback': 'qqqq', 'theme': 'dark'});
});
};
</script>
<script src='https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit' async defer></script>
여러 블록 reCAPTCHA를 거기에 있습니다
<div class="g-recaptcha"></div>
모든 reCAPTCHA를의 잘 렌더링, 어두운 테마로 모두가 모든 작업을 확인하는,하지만 은 callback
함수가 호출되지 않습니다 .
데이터 콜백 속성을 사용하여 단일 reCAPTCHA를 시도해 보았을 때 제대로 작동했습니다.