本文介绍了ReCAPTCHA 占位符元素必须是元素或 ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在页脚中放置:
我通过以下方式与我们联系:
我在使用 google recaptcha 时遇到了一些问题.
i have some problem with google recaptcha.
我在同一个网站上放了 2 个 recaptachs,但在不同的位置.
i put 2 recaptachs in same website but in deferent locations.
<div class="g-recaptcha" id="recaptcha1"></div>
<div class="g-recaptcha" id="recaptcha2"></div>
但它给了我这个错误:ReCAPTCHA 占位符元素必须是元素或 ID.
but its give me this error: ReCAPTCHA placeholder element must be an element or id.
我的代码:
<script src="www.google/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script> <script type="text/javascript"> var recaptcha1; var recaptcha2; var onloadCallback = function() { //Render the recaptcha1 on the element with ID "recaptcha1" recaptcha1 = grecaptcha.render('recaptcha1', { 'sitekey' : '*******', //Replace this with your Site key 'theme' : 'light' }); //Render the recaptcha2 on the element with ID "recaptcha2" recaptcha2 = grecaptcha.render('recaptcha2', { 'sitekey' : '*******', //Replace this with your Site key 'theme' : 'light' }); grecaptcha.reset(recaptcha1); grecaptcha.reset(recaptcha2); }; </script>我把之前的所有脚本和代码都放了
i plase all the script and the code in the before
我在这里进行了研究,但仍然无法正常工作.
i did a reserach here but its still not working.
感谢所有帮助.
推荐答案仅在验证码标签之后附加您的脚本一次
attach your script only once and after captcha tag
更多推荐
ReCAPTCHA 占位符元素必须是元素或 ID
发布评论