reCAPTCHA - 按下提交后出现 [英] reCAPTCHA - to appear after press submit

查看:41
本文介绍了reCAPTCHA - 按下提交后出现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的表单中使用 reCAPTCHA.用户必须填写表格,然后按提交".之后,在提交"按钮下,应出现 reCAPTCHA.

I wanna use reCAPTCHA for my form. The user must fill the form and then press "Submit". After this, under the "Submit"-Button, reCAPTCHA should appear.

我该怎么做?

推荐答案

我只需要做你想做的事,所以最初保持 reCaptcha 隐藏并在提交时显示.

I just needed to do what you wanted, so initially keep reCaptcha hidden and show it on submit.

所以我用 CSS 隐藏了它:

So I've hidden it with CSS:

div[id*='g-recaptcha'] {display:none}

然后在有人开始填写表单时使用jQuery显示它,因此输入字段焦点:

And then showed it with jQuery when someone starts to fill in the form, so on input field focus:

$(".YOUR_CLASS_WRAPPER input").focus(function() {
    $(".YOUR_CLASS_WRAPPER div[id*='g-recaptcha']").css("display","block");
});

这篇关于reCAPTCHA - 按下提交后出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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