我在使用v2隐形验证码时出现以下错误
recaptcha__en.js:513未捕获的错误:reCAPTCHA占位符元素必须为空在YG(recaptcha__en.js:513)在recaptcha__en.js:520在Array.forEach()在pG(recaptcha__en.js:520)在xG(recaptcha__en.js:517)在recaptcha__en.js:507在j $(recaptcha__en.js:304)在RZ(recaptcha__en.js:507)在recaptcha__en.js:523在recaptcha__en.js:543
我进行了搜索,但到处都在说您多次加载脚本,我认为我没有这样做
以下是我的代码
<div class="osnlogin-button">
<a type="submit" href="" id="recaptcha-submit" class="osnlogin-signin-btn g-recaptcha"><span class="signin lightboxed">Login</span></a>
</div>
<div class="g-recaptcha" data-sitekey="xxx" data-bind="recaptcha-submit" data-callback="onCapchaValidated">
</div>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
var onCapchaValidated = function () {
$('#loginForm').submit();
};