How to Reload ReCaptcha using JavaScript?

前端 未结 10 578
情深已故
情深已故 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:39

    Or you could just simulate a click on the refresh button

    // If recaptcha object exists, refresh it
        if (typeof Recaptcha != "undefined") {
          jQuery('#recaptcha_reload').click();
        }
    

提交回复
热议问题