【问题标题】:Is there a recaptcha component that I can use in my amp page?我可以在我的 amp 页面中使用 recaptcha 组件吗?
【发布时间】:2020-12-13 20:18:57
【问题描述】:

我正在将我的页面转换为 Google amp 页面,我的页面链接如下。

https://ppcexpo.com/Contactus

我在使用https://www.google.com/recaptcha/api.js 脚本创建的这个页面中使用recaptcha 控件。我想在 Google AMP 中使用相同的 recaptcha 功能,我该怎么做?

【问题讨论】:

    标签: html recaptcha amp-html


    【解决方案1】:

    你需要使用amp-recaptcha-input组件

    <script async custom-element="amp-recaptcha-input" src="https://cdn.ampproject.org/v0/amp-recaptcha-input-0.1.js"></script>
    

    使用:

    <form amp-form-attributes-go-here>
      ...
      <amp-recaptcha-input layout="nodisplay" name="reCAPTCHA_body_key" data-sitekey=”reCAPTCHA_site_key" data-action="reCAPTCHA_example_action">
      </amp-recaptcha-input>
      ...
    </form>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-03
      • 1970-01-01
      • 2017-06-19
      • 1970-01-01
      • 2016-06-13
      • 1970-01-01
      • 2021-06-28
      • 2021-09-13
      相关资源
      最近更新 更多