【发布时间】:2020-12-13 20:18:57
【问题描述】:
我正在将我的页面转换为 Google amp 页面,我的页面链接如下。
我在使用https://www.google.com/recaptcha/api.js 脚本创建的这个页面中使用recaptcha 控件。我想在 Google AMP 中使用相同的 recaptcha 功能,我该怎么做?
【问题讨论】:
我正在将我的页面转换为 Google amp 页面,我的页面链接如下。
我在使用https://www.google.com/recaptcha/api.js 脚本创建的这个页面中使用recaptcha 控件。我想在 Google AMP 中使用相同的 recaptcha 功能,我该怎么做?
【问题讨论】:
你需要使用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>
【讨论】: