javascript - Javascript - 成功验证后的 google ReCaptcha V2 执行功能
问题描述
到目前为止,这是我的代码:
<script type="text/javascript">
var widgetId1;
var onloadCallback = function() {
widgetId1 = grecaptcha.render('le_captcha', {
'sitekey' : 'xxx',
'theme' : 'light'
});
};
function check(){
alert(grecaptcha.getResponse(widgetId1));
}
function executeMeAfterSuccessfullValidation(){
alert('user passed');
}
</script>
<button onclick="check()">check if passed</button>
<div id="le_captcha"></div>
我想executeMeAfterSuccessfullValidation
在用户成功验证后被调用。
他们的文档中没有任何内容如何做到这一点:https ://developers.google.com/recaptcha/docs/display
但我见过一些网站这样做。如何?
提前致谢
解决方案
推荐阅读
- php - 用于运行 PHP 服务的 XAMPP 虚拟主机
- python - Google Sheets API - Python - 不带括号的单元格的返回值
- android - Android 代理配置后无法上网
- python - python kivy NameError:名称'_name_'未定义
- google-cloud-platform - 云函数中的 getSignedUrl Promise 权限被拒绝
- python - 如何为每第 n 个句子换行?
- python - PyQt5 - 第二个窗口中的按钮在单击时不执行操作
- javascript - 如何在 django 中使用 @ 提及用户
- sql - Postgres:整数范围的唯一约束
- excel - 将数据转移到不同的列并“刷新”它们以占用空白空间