Google新的reCaptcha:如何更改文本“我不是机器人” [英] New Google reCaptcha: How to change text "I'm not a robot"

查看:246
本文介绍了Google新的reCaptcha:如何更改文本“我不是机器人”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我们的瑜伽网站上安装了最新的Google reCaptcha工具。现在,用户对复选框旁边显示的我不是机器人一词感到困惑。

I've installed the latest Google reCaptcha tool on our yoga website. Now the users are confused about the text "I'm not a robot" that appears next to the checkbox.

我们的大多数用户都不知道机器人这个词是什么表示在这种情况下,他们认为表格已损坏。他们也觉得使用我们的表格不太安全,因为在瑜伽网站上看到机器人一词很奇怪。

Most of our users do not know what the word "robot" means in this context and they think the form is broken. They also feel less safe using our form as it is weird to see the word "robot" on a yoga website.

如何将文本我不是机器人更改为用户可以理解的其他文字?

How do I change the text "I'm not a robot" to something else that the users understand?

文档在这一点上显得沉默寡言...

The docs appear silent on this point...

此外,似乎reRecaptcha的内容已通过远程JS和CSS完全锁定。我尝试使用以下JavaScript更改Googles recaptcha-anchor-label 的文本失败:

Also, it seems like the contents of the reRecaptcha are completely locked down via remote JS and CSS. I've unsuccessfully tried using the following javascript to change the text for Googles recaptcha-anchor-label:

<script type="text/javascript">
    $(document).ready(function () {
        $("#recaptcha-anchor-label").text("Something different.");
    });
</script>


推荐答案

回到这个老问题-现在有一个reCAPTCHA小部件的不可见版本,使您可以自己设计UI。您可以将挑战的执行绑定到您创建的按钮,也可以在后台以编程方式调用它。

Coming back to this old question - there is now an invisible version of the reCAPTCHA widget that allows you to design the UI on your own. You can bind the execution of the challenge to a button you've created or invoke it programmatically in the background.

我在此引用文档页面作为快速参考,您可以在此处了解更多信息。

I'm citing the docs page here for quick reference, you can read more about this here.


必需的属性是类名'g-recaptcha',您的站点密钥在data-sitekey属性中,以及一个JavaScript回调的名称,用于处理验证码的完成数据回调属性。

The necessary attributes are a class name 'g-recaptcha', your site key in the data-sitekey attribute, and the name of a JavaScript callback to handle completion of the captcha in the data-callback attribute.

Head:

   <script src="https://www.google.com/recaptcha/api.js" async defer></script>
   <script>
     function onSubmit(token) {
       document.getElementById("demo-form").submit();
     }
   </script>






正文:


Body:

  <form id='demo-form' action="?" method="POST">
    <button class="g-recaptcha" data-sitekey="your_site_key" data-callck='onSubmit'>Submit</button>
    <br/>
  </form>

这篇关于Google新的reCaptcha:如何更改文本“我不是机器人”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆