仔细阅读https://www.gstatic.com/recaptcha/api2/v1531759913576/recaptcha__en.js上的代码,有很多参考bottomleft
(bottomright
我想这与通常放置图标的位置相反)。
但是,如何启用此设置并将图标移到左下方?
刚刚解决了这个问题。你需要:
window._grecaptcha_callback = () => {
window.grecaptcha.render({
sitekey: grecaptcha_key,
badge: 'bottomleft',
})
window.grecaptcha.ready(() => {
// grecaptcha is ready
})
}
然后将脚本加载为https://www.google.com/recaptcha/api.js?onload=_grecaptcha_callback
。
通过这种方式,您调用执行的方式必须稍微改变为简单
window.grecaptcha.execute(0, {action})
例如。0
而不是将站点密钥作为第一个参数。
查看代码,还有许多其他未记录的设置:
sitekey, type, theme, size, tabindex, stoken, bind, preload, badge, s, pool, 'content-binding', action
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句