如何使用jquery刷新reCaptcha图像

Law*_*nce 2 php jquery captcha recaptcha

根据我的标题,我如何在PHP中刷新Google的recaptcha插件的重新搜索图像.可能吗?

我意识到没有第二次尝试相同图像的插件,所以我的看法是每次用户输入和失败时,我将需要使用jquery刷新图像.

我不想也不需要刷新页面,因为我使用.post来检查验证码输入.

以下是我的Javascript代码.

        if($("input[name='recaptcha_response_field']").val().length<=0){
            formOkay=0;
            alert('Captcha helps prevent Spamming. Captcha Cannot be empty');
            return false;          
        }else{
            $.post('/external_scripts/recaptcha-php-1.11/jpost/verification.php',$("form[name='registration']").serialize(),function(data){
                if(data==0){
                    formOkay=0;
                    alert('Captcha is Wrong');
                    return false;
                }else{
                    ..CARRY ON WITH FORM SUBMISSION
Run Code Online (Sandbox Code Playgroud)

Man*_*ish 5

Recaptcha.reload
Run Code Online (Sandbox Code Playgroud)

该方法reload显示新的CAPTCHA质询文档