How to Reload ReCaptcha using JavaScript?

前端 未结 10 595
情深已故
情深已故 2020-12-07 09:58

I have a signup form with AJAX so that I want to refresh Recaptcha image anytime an error is occured (i.e. username already in use).

I am looking for a code compatib

10条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 10:24

    Important: Version 1.0 of the reCAPTCHA API is no longer supported, please upgrade to Version 2.0.

    You can use grecaptcha.reset(); to reset the captcha.

    Source : https://developers.google.com/recaptcha/docs/verify#api-request

提交回复
热议问题